From 30556c8d78750429cf19f626ab14e786d3fa5ad6 Mon Sep 17 00:00:00 2001 From: Peter Schorn Date: Mon, 13 Mar 2017 21:59:37 +0100 Subject: [PATCH] AltairZ80: Fix uninitialized variable (Coverity Scan) --- AltairZ80/disasm.c | 2 +- AltairZ80/nasm.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/AltairZ80/disasm.c b/AltairZ80/disasm.c index 652ce87f..47357624 100644 --- a/AltairZ80/disasm.c +++ b/AltairZ80/disasm.c @@ -1180,7 +1180,7 @@ long disasm (unsigned char *data, char *output, int segsize, long offset) int rep, lock, asize, osize, i, slen, colon; unsigned char *origdata; int works; - insn tmp_ins, ins; + insn tmp_ins = { NULL }, ins; unsigned long goodness, best; /* diff --git a/AltairZ80/nasm.h b/AltairZ80/nasm.h index 2c47fa94..2745189b 100644 --- a/AltairZ80/nasm.h +++ b/AltairZ80/nasm.h @@ -260,7 +260,7 @@ typedef struct extop { /* extended operand */ #define MAXPREFIX 4 typedef struct { /* an instruction itself */ - /* char *label; not needed */ /* the label defined, or NULL */ + char *label; /* the label defined, or NULL */ int prefixes[MAXPREFIX]; /* instruction prefixes, if any */ int nprefix; /* number of entries in above */ int opcode; /* the opcode - not just the string */