mirror of
https://github.com/netwide-assembler/nasm.git
synced 2025-01-18 16:25:05 +08:00
Avoid some warnings in rdoff/rdf2bin.c
I received some warnings when running make on the head revision of nasm from git: ---- rdf2bin.c: In function 'main': rdf2bin.c:122: warning: comparison between signed and unsigned rdf2bin.c:123: warning: comparison between signed and unsigned rdf2bin.c:124: warning: comparison between signed and unsigned ---- I think these warnings are innocuous and should be safely avoidable with simple casts (please see attached patch). * rdoff/rdf2bin.c (main): cast to size_t for comparison with fwrite return value Signed-off-by: Bo Borgerson <gigabo@gmail.com>
This commit is contained in:
parent
72ec0e4144
commit
7d4d2c3cc9
@ -119,9 +119,9 @@ int main(int argc, char **argv)
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (fwrite(m->t, 1, m->f.seg[0].length, of) != m->f.seg[0].length ||
|
||||
fwrite(padding, 1, codepad, of) != codepad ||
|
||||
fwrite(m->d, 1, m->f.seg[1].length, of) != m->f.seg[1].length) {
|
||||
if (fwrite(m->t, 1, m->f.seg[0].length, of) != (size_t)m->f.seg[0].length ||
|
||||
fwrite(padding, 1, codepad, of) != (size_t)codepad ||
|
||||
fwrite(m->d, 1, m->f.seg[1].length, of) != (size_t)m->f.seg[1].length) {
|
||||
fprintf(stderr, "rdf2bin: error writing to %s\n", *argv);
|
||||
return 1;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user