recude gcc compiler warnings [-Wreorder] and [-Wsign-compare]