Fix warning 'enumeral and non-enumeral type in conditional expression'.
[ELF] Remove unused fields (linking context references).
[PECOFF] Fix -Wsign-compare warning.
Remove extra semicolon for -Wpedantic.