NASM Forum > Using NASM

Disable Warnings

(1/1)

nobody:
How can I disable the warnings on RESB intructions (zeroing). I didn't found it in the manual.

nasm64developer:
Why, by using it properly, of course!  :-)

In a normal segment you use D[BWQDT] to define
data. By contrast, in segments whose contents
doesn't end up in the output file, or whenever
you are in absolute space, you use RES[BWDQT]
to reserve space.

Fwiw, personally I think that these should be
errors instead of warnings.

Frank Kotler:
I'd have to agree. But nobody likes the "times" syntax (apparently), and having Nasm zero-fill "res?" in a "bits" section is *usually* what's intended...

Confine the use of "resb" (and friends) to your .bss section, in ".data" use "times N db 0" ("times" is quite flexible, and can be used for more than "zero-fill"), and Nasm will "shut up and assemble"...

The warning is not "suppresible", and isn't about to be made so - as nasm64developer says, it really should be an error. (but I'd favor leaving it as-is)

Best,
Frank

Navigation

[0] Message Index

Go to full version