From 7d4d2c3cc99f7f270b9be488c239b60af67b6504 Mon Sep 17 00:00:00 2001 From: Bo Borgerson Date: Sat, 12 Apr 2008 11:47:57 -0400 Subject: 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 --- rdoff/rdf2bin.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'rdoff') 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; } -- cgit v1.2.3