Re: kstrto*: converting strings to integers done (hopefully) right

From: Geert Uytterhoeven
Date: Wed Mar 23 2011 - 16:31:36 EST


On Wed, Mar 23, 2011 at 03:00, Linux Kernel Mailing List
<linux-kernel@xxxxxxxxxxxxxxx> wrote:
> --- /dev/null
> +++ b/lib/test-kstrtox.c

On 32-bit m68k:

lib/test-kstrtox.c: In function âtest_kstrtou64_okâ:
lib/test-kstrtox.c:318: warning: this decimal constant is unsigned
only in ISO C90
lib/test-kstrtox.c:319: warning: this decimal constant is unsigned
only in ISO C90
lib/test-kstrtox.c:320: warning: this decimal constant is unsigned
only in ISO C90
lib/test-kstrtox.c:321: warning: this decimal constant is unsigned
only in ISO C90
lib/test-kstrtox.c:322: warning: integer constant is too large for âlongâ type
lib/test-kstrtox.c:323: warning: integer constant is too large for âlongâ type
lib/test-kstrtox.c: In function âtest_kstrtos64_okâ:
lib/test-kstrtox.c:372: warning: this decimal constant is unsigned
only in ISO C90
lib/test-kstrtox.c:373: warning: this decimal constant is unsigned
only in ISO C90
lib/test-kstrtox.c:374: warning: this decimal constant is unsigned
only in ISO C90
lib/test-kstrtox.c:375: warning: this decimal constant is unsigned
only in ISO C90
lib/test-kstrtox.c:376: warning: integer constant is too large for âlongâ type
lib/test-kstrtox.c:377: warning: integer constant is too large for âlongâ type
lib/test-kstrtox.c: In function âtest_kstrtou32_okâ:
lib/test-kstrtox.c:421: warning: this decimal constant is unsigned
only in ISO C90
lib/test-kstrtox.c:422: warning: this decimal constant is unsigned
only in ISO C90
lib/test-kstrtox.c:423: warning: this decimal constant is unsigned
only in ISO C90
lib/test-kstrtox.c:424: warning: this decimal constant is unsigned
only in ISO C90

Probably you need a few more U/ULL suffixes.

Gr{oetje,eeting}s,

            Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
             Â Â -- Linus Torvalds
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/