comparison lwlib/lw_expr.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 644f8abf87dc
children 623b62ab774b
comparison
equal deleted inserted replaced
263:8dd8c3bdca7c 264:346966cffeef
953 c++; 953 c++;
954 } 954 }
955 } 955 }
956 if (c == 1) 956 if (c == 1)
957 { 957 {
958 lw_expr_t r; 958 lw_expr_t r = NULL;
959 // find the value and "move it up" 959 // find the value and "move it up"
960 while (E -> operands) 960 while (E -> operands)
961 { 961 {
962 o = E -> operands; 962 o = E -> operands;
963 if (o -> p -> type != lw_expr_type_int || o -> p -> value != 0) 963 if (o -> p -> type != lw_expr_type_int || o -> p -> value != 0)