]> mj.ucw.cz Git - libucw.git/commitdiff
Fixed constness warnings in conf-test.
authorMartin Mares <mj@ucw.cz>
Mon, 9 Feb 2009 19:38:03 +0000 (20:38 +0100)
committerMartin Mares <mj@ucw.cz>
Mon, 9 Feb 2009 19:38:03 +0000 (20:38 +0100)
ucw/conf-test.c

index b62cde6c69b8fed0e15228de8b24e9541b76f6a9..589e7c2a73da7b22b71802698d10b275b982a4c6 100644 (file)
@@ -133,7 +133,7 @@ commit_top(void *ptr UNUSED)
   return NULL;
 }
 
-static char *alphabet[] = { "alpha", "beta", "gamma", "delta", NULL };
+static const char * const alphabet[] = { "alpha", "beta", "gamma", "delta", NULL };
 static struct cf_section cf_top = {
   CF_INIT(init_top),
   CF_COMMIT(commit_top),
@@ -153,7 +153,7 @@ static struct cf_section cf_top = {
     CF_LOOKUP_DYN("look", &look, alphabet, 1000),
     CF_USER_ARY("numbers", numbers, &u16_type, 10),
     CF_BITMAP_INT("bitmap1", &bitmap1),
-    CF_BITMAP_LOOKUP("bitmap2", &bitmap2, ((char*[]) {
+    CF_BITMAP_LOOKUP("bitmap2", &bitmap2, ((const char* const[]) {
          "one", "two", "three", "four", "five", "six", "seven", "eight", 
          "nine", "ten", "eleven", "twelve", "thirteen", "fourteen", "fifteen", "seventeen", 
          "eighteen", "nineteen", "twenty", NULL        // hidden joke here