From: Martin Mares Date: Mon, 9 Feb 2009 19:38:03 +0000 (+0100) Subject: Fixed constness warnings in conf-test. X-Git-Tag: holmes-import~113 X-Git-Url: http://mj.ucw.cz/gitweb/?a=commitdiff_plain;h=d0085eb66f33ea31308f71004cb78c2223fa58dd;p=libucw.git Fixed constness warnings in conf-test. --- diff --git a/ucw/conf-test.c b/ucw/conf-test.c index b62cde6c..589e7c2a 100644 --- a/ucw/conf-test.c +++ b/ucw/conf-test.c @@ -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