summaryrefslogtreecommitdiff
path: root/posix
diff options
context:
space:
mode:
authorJoseph Myers <joseph@codesourcery.com>2014-12-02 22:03:59 +0000
committerJoseph Myers <joseph@codesourcery.com>2014-12-02 22:03:59 +0000
commitb1aff6a41120c1d9cedc1ecedeafc79f161ce982 (patch)
tree355198c1ce35f90579d11a5b67f405f6694de6ac /posix
parent266865c0e7b79d4196e2cc393693463f03c90bd8 (diff)
downloadglibc-b1aff6a41120c1d9cedc1ecedeafc79f161ce982.tar.gz
Fix warning in posix/tst-getopt_long1.c.
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 *.
Diffstat (limited to 'posix')
-rw-r--r--posix/tst-getopt_long1.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/posix/tst-getopt_long1.c b/posix/tst-getopt_long1.c
index e0ecd12190..3895ebd99b 100644
--- a/posix/tst-getopt_long1.c
+++ b/posix/tst-getopt_long1.c
@@ -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);