remove some GCC warnings
C102de: fix build error
C102de: BC: seg037(random)
G105de: quieten some GCC warnings
M302de: quieten some GCC warnings
M302de: BC: use ternary operator