Hello list,
I just browsed file main.c and found the following:
static void toy_singleinit(struct toy_list *which, char *argv[])
{
..
if (CFG_TOYBOX_I18N) setlocale(LC_ALL, "C"+!!(which->flags &
TOYFLAG_LOCALE));
clang-3.5 complains:
main.c:72:45: warning: adding 'int' to a string does not append to the
string [-Wstring-plus-int]
main.c:72:45: note: use array indexing to silence this warning
According to setlocale(3), on startup of the main program, the
portable "C" locale is selected as default. A program may be made
portable to all locales by calling setlocale(LC_ALL, "").
It seems that Toybox would like to pass argument "C" or "" to
setlocale(). Is my understanding right? If so, how can we suppress the
warning?
Thanks,
-jserv
_______________________________________________
Toybox mailing list
[email protected]
http://lists.landley.net/listinfo.cgi/toybox-landley.net