00db10
commit b1aff6a41120c1d9cedc1ecedeafc79f161ce982
00db10
Author: Joseph Myers <joseph@codesourcery.com>
00db10
Date:   Tue Dec 2 22:03:59 2014 +0000
00db10
00db10
    Fix warning in posix/tst-getopt_long1.c.
00db10
    
00db10
    This patch fixes a "discards qualifiers" warning in
00db10
    posix/tst-getopt_long1.c.  glibc is built with -Wwrite-strings,
00db10
    meaning a char * cannot be initialized directly with a string
00db10
    constant; the patch casts the string constants to char *.
00db10
    
00db10
    Tested for x86_64.
00db10
    
00db10
            * posix/tst-getopt_long1.c (do_test): Cast elements of argv array
00db10
            to char *.
00db10
00db10
diff --git a/posix/tst-getopt_long1.c b/posix/tst-getopt_long1.c
00db10
index e0ecd121908de5f8..3895ebd99b291917 100644
00db10
--- a/posix/tst-getopt_long1.c
00db10
+++ b/posix/tst-getopt_long1.c
00db10
@@ -39,7 +39,7 @@ do_test (void)
00db10
       return 1;
00db10
     }
00db10
 
00db10
-  char *argv[] = { "program", "--on" };
00db10
+  char *argv[] = { (char *) "program", (char *) "--on" };
00db10
   int argc = 2;
00db10
 
00db10
   int c = getopt_long (argc, argv, "12345", opts, NULL);