summaryrefslogtreecommitdiff
path: root/output
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2020-06-01 16:11:47 -0700
committerH. Peter Anvin <hpa@zytor.com>2020-06-01 16:11:47 -0700
commita3cbaafd523229b98527a6ae07ec8b6acd06b57d (patch)
tree26febeded5d28535e3525b8e5fdc9bfc9fea9661 /output
parent7002bb76a3b6c43848dac2e7defcf95c46040517 (diff)
downloadnasm-a3cbaafd523229b98527a6ae07ec8b6acd06b57d.tar.gz
outobj: fix harmless but still incorrect use of uninitialized variable
Fix use of uninitialized variable. This most likely is just an issue while running at debug level >= 3, but it's still wrong. Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
Diffstat (limited to 'output')
-rw-r--r--output/outobj.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/output/outobj.c b/output/outobj.c
index 9d5e4b6a..0d4d3110 100644
--- a/output/outobj.c
+++ b/output/outobj.c
@@ -833,7 +833,7 @@ static void obj_deflabel(char *name, int32_t segment,
* `first_seg'.
*/
if (!any_segs && segment == first_seg) {
- int tempint; /* ignored */
+ int tempint = 0;
if (segment != obj_segment("__NASMDEFSEG", &tempint))
nasm_panic("strange segment conditions in OBJ driver");
}
@@ -1025,7 +1025,7 @@ static void obj_out(int32_t segto, const void *data,
* segment.
*/
if (!any_segs) {
- int tempint; /* ignored */
+ int tempint = 0;
if (segto != obj_segment("__NASMDEFSEG", &tempint))
nasm_panic("strange segment conditions in OBJ driver");
}
@@ -2498,7 +2498,7 @@ static void dbgbi_linnum(const char *lnfname, int32_t lineno, int32_t segto)
* segment.
*/
if (!any_segs) {
- int tempint; /* ignored */
+ int tempint = 0;
if (segto != obj_segment("__NASMDEFSEG", &tempint))
nasm_panic("strange segment conditions in OBJ driver");
}