summaryrefslogtreecommitdiff
path: root/rdoff
diff options
context:
space:
mode:
authorBo Borgerson <gigabo@gmail.com>2008-04-12 11:47:57 -0400
committerH. Peter Anvin <hpa@zytor.com>2008-04-12 11:12:14 -0700
commit7d4d2c3cc99f7f270b9be488c239b60af67b6504 (patch)
tree4de67389da1fb53f30d79fd435600d9ae20a9d3d /rdoff
parent72ec0e414453d9d036a932b60939467c81582e14 (diff)
downloadnasm-7d4d2c3cc99f7f270b9be488c239b60af67b6504.tar.gz
nasm-7d4d2c3cc99f7f270b9be488c239b60af67b6504.tar.bz2
nasm-7d4d2c3cc99f7f270b9be488c239b60af67b6504.zip
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>
Diffstat (limited to 'rdoff')
-rw-r--r--rdoff/rdf2bin.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/rdoff/rdf2bin.c b/rdoff/rdf2bin.c
index 7140b2b..c23b18c 100644
--- a/rdoff/rdf2bin.c
+++ b/rdoff/rdf2bin.c
@@ -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;
}