This patch fixes a "discards qualifiers" warning in
posix/tst-getopt_long1.c. glibc is built with -Wwrite-strings,
meaning a char * cannot be initialized directly with a string
constant; the patch casts the string constants to char *.
Tested for x86_64.
* posix/tst-getopt_long1.c (do_test): Cast elements of argv array
to char *.
2014-12-02 Joseph Myers <joseph@codesourcery.com>
+ * posix/tst-getopt_long1.c (do_test): Cast elements of argv array
+ to char *.
+
[BZ #17665]
* posix/unistd.h [__USE_MISC || (__USE_XOPEN && !__USE_UNIX98)]:
Change conditional to [__USE_MISC].
return 1;
}
- char *argv[] = { "program", "--on" };
+ char *argv[] = { (char *) "program", (char *) "--on" };
int argc = 2;
int c = getopt_long (argc, argv, "12345", opts, NULL);