Mercurial > hg > index.cgi
comparison lwasm/output.c @ 221:2b784a28428e
Silence a few warnings
Add workaround to silence a few warnings about variables being set but not
used.
author | William Astle <lost@l-w.ca> |
---|---|
date | Sun, 15 Jul 2012 10:27:43 -0600 |
parents | 17bd59f045af |
children | d4ac484d0ec6 |
comparison
equal
deleted
inserted
replaced
220:3604d0ef06c6 | 221:2b784a28428e |
---|---|
35 void write_code_rawrel(asmstate_t *as, FILE *of); | 35 void write_code_rawrel(asmstate_t *as, FILE *of); |
36 void write_code_obj(asmstate_t *as, FILE *of); | 36 void write_code_obj(asmstate_t *as, FILE *of); |
37 void write_code_os9(asmstate_t *as, FILE *of); | 37 void write_code_os9(asmstate_t *as, FILE *of); |
38 | 38 |
39 // this prevents warnings about not using the return value of fwrite() | 39 // this prevents warnings about not using the return value of fwrite() |
40 #define writebytes(s, l, c, f) do { int r; r = fwrite((s), (l), (c), (f)); } while (0) | 40 // r++ prevents the "set but not used" warnings; should be optimized out |
41 #define writebytes(s, l, c, f) do { int r; r = fwrite((s), (l), (c), (f)); r++; } while (0) | |
41 | 42 |
42 void do_output(asmstate_t *as) | 43 void do_output(asmstate_t *as) |
43 { | 44 { |
44 FILE *of; | 45 FILE *of; |
45 | 46 |