Author Topic: Disable Warnings  (Read 15260 times)

nobody

  • Guest
Disable Warnings
« on: January 23, 2005, 05:14:37 PM »
How can I disable the warnings on RESB intructions (zeroing). I didn't found it in the manual.

nasm64developer

  • Guest
Re: Disable Warnings
« Reply #1 on: January 24, 2005, 02:37:10 AM »
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.

Offline Frank Kotler

  • NASM Developer
  • Hero Member
  • *****
  • Posts: 2667
  • Country: us
Re: Disable Warnings
« Reply #2 on: January 24, 2005, 03:24:47 AM »
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