Mercurial > hg > index.cgi
diff 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 |
line wrap: on
line diff
--- a/lwasm/output.c Sun Jun 10 18:33:22 2012 -0600 +++ b/lwasm/output.c Sun Jul 15 10:27:43 2012 -0600 @@ -37,7 +37,8 @@ void write_code_os9(asmstate_t *as, FILE *of); // this prevents warnings about not using the return value of fwrite() -#define writebytes(s, l, c, f) do { int r; r = fwrite((s), (l), (c), (f)); } while (0) +// r++ prevents the "set but not used" warnings; should be optimized out +#define writebytes(s, l, c, f) do { int r; r = fwrite((s), (l), (c), (f)); r++; } while (0) void do_output(asmstate_t *as) {