Mercurial > hg > index.cgi
changeset 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 | 3604d0ef06c6 |
children | 03f7192fcd20 |
files | lwasm/output.c |
diffstat | 1 files changed, 2 insertions(+), 1 deletions(-) [+] |
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) {