Fix warning in posix/tst-getopt_long1.c
Commit Message
On Tue, 2 Dec 2014, Roland McGrath wrote:
> The strings won't be modified. So why not just add (char *) casts?
Here is a patch version using casts. Tested for x86_64.
2014-12-02 Joseph Myers <joseph@codesourcery.com>
* posix/tst-getopt_long1.c (do_test): Cast elements of argv array
to char *.
Comments
> Here is a patch version using casts. Tested for x86_64.
I like that one.
@@ -39,7 +39,7 @@ do_test (void)
return 1;
}
- char *argv[] = { "program", "--on" };
+ char *argv[] = { (char *) "program", (char *) "--on" };
int argc = 2;
int c = getopt_long (argc, argv, "12345", opts, NULL);