comparison lwasm/pseudo.c @ 264:346966cffeef

Clean up various warnings when building under -Wall Add some gimmicks to prevent fread() and fwrite() warnings about ignoring the return value. Yes, this is probably not a good thing to do, but doing something with a non-success return value is going to involve crashing out or something anyway. Also fix several warnings about variables used while possibly uninitialized. The code flow shows that this cannot be the case but initializing them to a plausible value at declaration time costs pretty much nothing and it makes gcc happy. Also caught a use of | instead of || which probably would have caused a certain check for duplicate declarations in __os9 sections to behave oddly.
author William Astle <lost@l-w.ca>
date Wed, 06 Feb 2013 21:43:10 -0700
parents 0e4a9b21ad7b
children 35c051bffbff
comparison
equal deleted inserted replaced
263:8dd8c3bdca7c 264:346966cffeef
1473 } 1473 }
1474 1474
1475 RESOLVEFUNC(pseudo_resolve_align) 1475 RESOLVEFUNC(pseudo_resolve_align)
1476 { 1476 {
1477 lw_expr_t e; 1477 lw_expr_t e;
1478 int align; 1478 int align = 1;
1479 1479
1480 e = lwasm_fetch_expr(l, 0); 1480 e = lwasm_fetch_expr(l, 0);
1481 1481
1482 if (lw_expr_istype(e, lw_expr_type_int)) 1482 if (lw_expr_istype(e, lw_expr_type_int))
1483 { 1483 {
1550 } 1550 }
1551 1551
1552 RESOLVEFUNC(pseudo_resolve_fill) 1552 RESOLVEFUNC(pseudo_resolve_fill)
1553 { 1553 {
1554 lw_expr_t e; 1554 lw_expr_t e;
1555 int align; 1555 int align = 1;
1556 1556
1557 e = lwasm_fetch_expr(l, 0); 1557 e = lwasm_fetch_expr(l, 0);
1558 1558
1559 if (lw_expr_istype(e, lw_expr_type_int)) 1559 if (lw_expr_istype(e, lw_expr_type_int))
1560 { 1560 {