Fix compiler warnings about unused local variable on some plaforms