Make it compile again in pure C mode
Silence some gcc warnings...

- Silence some trivial warning.
- TODO: narrowing in a few places.