* tests/test-mbsstr1.c (main): Add "const" to avoid trivial warning.
* tests/test-mbsstr2.c (main): Likewise.
2010-06-11 Jim Meyering <meyering@redhat.com>
+ 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.
+
test-verify: avoid warning from gcc's -Wmissing-declarations
* tests/test-verify.c (function): Declare to be static.
{
size_t repeat = 10000;
size_t m = 1000000;
- char *needle =
+ const char *needle =
"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA";
char *haystack = (char *) malloc (m + 1);
{
size_t repeat = 10000;
size_t m = 1000000;
- char *haystack =
+ const char *haystack =
"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
"ABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABAB";
char *needle = (char *) malloc (m + 1);
{
size_t repeat = 10000;
size_t m = 1000000;
- char *needle =
+ const char *needle =
"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
"AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA";
char *haystack = (char *) malloc (m + 1);
{
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"