[kihx] Fix incomplete code

- Fix module unloading crash.
- Remove compile warnings.
- Raise the warning level of the debug build (1 -> 4)