Fix printf() invocation by casting to appropriate types