summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChang S. Bae <chang.seok.bae@intel.com>2017-04-16 20:24:39 -0700
committerH. Peter Anvin <hpa@linux.intel.com>2017-04-17 14:01:33 -0700
commit543173256091ef104b021ef9017a4486c2b9bfc6 (patch)
treefd3d6943ea52d9e4479a852fb359a4136aaadcf4
parentd685bdd65c92dc0a157f32c8b1be5abd62792618 (diff)
downloadnasm-543173256091ef104b021ef9017a4486c2b9bfc6.tar.gz
Fix errors uncovered by clang warnings
1. One incorrect variable use(!) 2. One possibly uninitialized variable. Signed-off-by: Chang S. Bae <chang.seok.bae@intel.com> Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
-rw-r--r--nasmlib/file.c2
-rw-r--r--output/outdbg.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/nasmlib/file.c b/nasmlib/file.c
index 7552b6fb..0d0c24bc 100644
--- a/nasmlib/file.c
+++ b/nasmlib/file.c
@@ -132,7 +132,7 @@ void fwritezero(off_t bytes, FILE *fp)
FILE *nasm_open_read(const char *filename, enum file_flags flags)
{
- FILE *f;
+ FILE *f = NULL;
bool again = true;
#ifdef __GLIBC__
diff --git a/output/outdbg.c b/output/outdbg.c
index 1a18c482..130c9d72 100644
--- a/output/outdbg.c
+++ b/output/outdbg.c
@@ -165,7 +165,7 @@ static void dbg_out(const struct out_data *data)
"out to %"PRIx32":%"PRIx64" %s %s bits %d insoffs %d/%d "
"size %"PRIu64,
data->segment, data->offset,
- out_type(data->type), out_sign(data->type),
+ out_type(data->type), out_sign(data->sign),
data->bits, data->insoffs, data->inslen, data->size);
if (data->itemp) {
fprintf(ofile, " ins %s(%d)",