>>>>> "Jim" == Jim Paris <[email protected]> writes:

    >> From: Uwe Bonnes <[email protected]> Date: Sat,
    >> 25 Sep 2010 17:01:09 +0200 Subject: Fix formatting warnings
    Jim> ...
    >> - fprintf(stderr, "Skip %7d blocks from 0x%08x to 0x%08x at blocks
    >> %10ld \n", + fprintf(stderr, "Skip %7d blocks from 0x%08x to 0x%08x
    >> at blocks %10lld \n",

    Jim> Both of those can give warnings depending on architecture:

    Jim> #include <stdint.h> #include <stdio.h> #include <inttypes.h> int
    Jim> main() { uint64_t x = 0x0123456789abcdefULL; printf("%lu\n", x); //
    Jim> warns on 32-bit arch printf("%llu\n", x); // warns on 64-bit arch
    Jim> printf("%llu\n", (unsigned long long)x); // correct on both
    Jim> printf("%" PRIu64 "\n", x); // correct on both return 0; }

Any idea how to code architecture indepent?
-- 
Uwe Bonnes                [email protected]

Institut fuer Kernphysik  Schlossgartenstrasse 9  64289 Darmstadt
--------- Tel. 06151 162516 -------- Fax. 06151 164321 ----------

--
libftdi - see http://www.intra2net.com/en/developer/libftdi for details.
To unsubscribe send a mail to [email protected]   

Reply via email to