Avoid some more warnings from "gcc -Wwrite-strings".
[gnulib.git] / tests / test-strstr.c
index b6845ab..1482e7d 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2004, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
+ * Copyright (C) 2004, 2007-2010 Free Software Foundation, Inc.
  * Written by Bruno Haible and Eric Blake
  *
  * This program is free software: you can redistribute it and/or modify
@@ -96,7 +96,7 @@ main (int argc, char *argv[])
   {
     size_t repeat = 10000;
     size_t m = 1000000;
-    char *needle =
+    const char *needle =
       "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
       "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA";
     char *haystack = (char *) malloc (m + 1);
@@ -120,7 +120,7 @@ main (int argc, char *argv[])
   {
     size_t repeat = 10000;
     size_t m = 1000000;
-    char *haystack =
+    const char *haystack =
       "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
       "ABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABAB";
     char *needle = (char *) malloc (m + 1);