diff options
author | Jim Meyering <meyering@redhat.com> | 2010-06-11 09:27:19 +0200 |
---|---|---|
committer | Jim Meyering <meyering@redhat.com> | 2010-06-11 09:28:09 +0200 |
commit | 84746b2f407af414344b9e6a611edd2e42ceeec6 (patch) | |
tree | 02ad57c71d1fe96524e11c88963009017760dd9c /tests | |
parent | f2cde42348744d5c0914280135564e87eaa89f4d (diff) | |
download | gnulib-84746b2f407af414344b9e6a611edd2e42ceeec6.tar.gz |
tests: avoid 'const' discard warnings in mbsstr tests
* tests/test-mbsstr1.c (main): Add "const" to avoid trivial warning.
* tests/test-mbsstr2.c (main): Likewise.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test-mbsstr1.c | 4 | ||||
-rw-r--r-- | tests/test-mbsstr2.c | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/tests/test-mbsstr1.c b/tests/test-mbsstr1.c index e9fb50eadf..2a9e8c4d58 100644 --- a/tests/test-mbsstr1.c +++ b/tests/test-mbsstr1.c @@ -58,7 +58,7 @@ main () { size_t repeat = 10000; size_t m = 1000000; - char *needle = + const char *needle = "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"; char *haystack = (char *) malloc (m + 1); @@ -82,7 +82,7 @@ main () { size_t repeat = 10000; size_t m = 1000000; - char *haystack = + const char *haystack = "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" "ABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABAB"; char *needle = (char *) malloc (m + 1); diff --git a/tests/test-mbsstr2.c b/tests/test-mbsstr2.c index 488b21084b..5e212cb6cd 100644 --- a/tests/test-mbsstr2.c +++ b/tests/test-mbsstr2.c @@ -67,7 +67,7 @@ main () { size_t repeat = 10000; size_t m = 1000000; - char *needle = + const char *needle = "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"; char *haystack = (char *) malloc (m + 1); @@ -91,7 +91,7 @@ main () { size_t repeat = 10000; size_t m = 1000000; - char *haystack = + const char *haystack = "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" "A\303\207A\303\207A\303\207A\303\207A\303\207A\303\207A\303\207" "A\303\207A\303\207A\303\207A\303\207A\303\207A\303\207A\303\207" |