lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 16 Jun 2010 23:08:03 +0400
From:	Vladislav Bolkhovitin <vst@...b.net>
To:	sparclinux@...r.kernel.org
CC:	Simone Ricci <simone.ricci@...il.com>,
	scst-devel@...ts.sourceforge.net, Joe Eykholt <jeykholt@...co.com>,
	linux-kernel <linux-kernel@...r.kernel.org>
Subject: How to printk/sprintf uint64_t on Sparc without format and argument
 types mismatch

Hello,

We in SCST project need to printk/sprintf variables of type uint64_t. 
Size of those variables is required to be 64-bit integer. On x86 we 
printk/sprintf them as %lld, but on Sparc we have a compiler warnings like:

scst/src/scst_targ.c:2136: warning: format ‘%llx’ expects type ‘long 
long unsigned int’, but argument 4 has type ‘uint64_t’.

It is because on Sparc uint64_t defined as unsigned long, but on x86 - 
as unsigned long long.

Sure, we can cast all the cases to unsigned long long, but we wonder, 
maybe there is a more elegant way to do that without the warning? For 
instance, like %z for size_t or PRId64 in the user space.

Thanks,
Vlad

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ