Fix problem with newer MinGW runtimes
Fix all warnings reported by clang
Use binary operators rather than "Python modulo" in decoding block positions