Fix some warnings which are causing debug builds to fail.

- Clang: private field 'module' is not used
- GCC: suggest a space before ‘;’ or explicit braces around empty
       body in ‘while’ statement
Merge pull request #589 from SaberUK/master+fix-debug-build

Fix some warnings which are causing debug builds to fail.