mirror of
https://github.com/netwide-assembler/nasm.git
synced 2025-11-08 23:27:15 -05:00
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>
This commit is contained in:
@@ -833,7 +833,7 @@ static void obj_deflabel(char *name, int32_t segment,
|
|||||||
* `first_seg'.
|
* `first_seg'.
|
||||||
*/
|
*/
|
||||||
if (!any_segs && segment == first_seg) {
|
if (!any_segs && segment == first_seg) {
|
||||||
int tempint; /* ignored */
|
int tempint = 0;
|
||||||
if (segment != obj_segment("__NASMDEFSEG", &tempint))
|
if (segment != obj_segment("__NASMDEFSEG", &tempint))
|
||||||
nasm_panic("strange segment conditions in OBJ driver");
|
nasm_panic("strange segment conditions in OBJ driver");
|
||||||
}
|
}
|
||||||
@@ -1025,7 +1025,7 @@ static void obj_out(int32_t segto, const void *data,
|
|||||||
* segment.
|
* segment.
|
||||||
*/
|
*/
|
||||||
if (!any_segs) {
|
if (!any_segs) {
|
||||||
int tempint; /* ignored */
|
int tempint = 0;
|
||||||
if (segto != obj_segment("__NASMDEFSEG", &tempint))
|
if (segto != obj_segment("__NASMDEFSEG", &tempint))
|
||||||
nasm_panic("strange segment conditions in OBJ driver");
|
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.
|
* segment.
|
||||||
*/
|
*/
|
||||||
if (!any_segs) {
|
if (!any_segs) {
|
||||||
int tempint; /* ignored */
|
int tempint = 0;
|
||||||
if (segto != obj_segment("__NASMDEFSEG", &tempint))
|
if (segto != obj_segment("__NASMDEFSEG", &tempint))
|
||||||
nasm_panic("strange segment conditions in OBJ driver");
|
nasm_panic("strange segment conditions in OBJ driver");
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user