get rid of GCC warnings about unused vars and some abuse of unspecified operation order