Fix C compiler warnings

Made some casts explicit.
Remove synchronized block for 1-byte read/writes

Probably not worth the effort to synchronize.
Fix round bracket in Linux
Merge pull request #2 from kohlschuetter/ck1

Pull latest changes from dev branch