Format warnings in krl.c

Dag-Erling Smørgrav des at
Tue Apr 2 00:56:53 EST 2013

Compiling krl.c with clang results in a slew of warnings like this one:

/usr/src/secure/lib/libssh/../../../crypto/openssh/krl.c:505:37: warning: 
      format specifies type 'unsigned long long' but the argument has type
      'u_int64_t' (aka 'unsigned long') [-Wformat]

This comes from incorrectly assuming that u_int64_t is defined as
unsigned long long, whereas on 64-bit FreeBSD platforms, it is defined
as unsigned long.  I don't know if gcc cares, but clang does.

The attached patch adds explicit casts to krl.c.  I would prefer using
%ju and uintmax_t, but I'm doubt that uintmax_t is available on all
platforms OpenSSH supports.

Dag-Erling Smørgrav - des at

-------------- next part --------------
A non-text attachment was scrubbed...
Name: openssh-krl-printf-format.diff
Type: text/x-patch
Size: 1660 bytes
Desc: not available
URL: <>

More information about the openssh-unix-dev mailing list