Fix warning: double parens on conditional exp.
Fix warning: remove comparison with unsigned < 0
Fix compile error: missing include for critical()
Fix warning: printing 64 bit values.

For i386/32bit use %ll, but to keep 64bit happy
cast to long long.