From 00b226bfe48faba2ab8c74cae5eeff564969d03a Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Mon, 5 Dec 2011 16:42:46 +1030 Subject: lib/ccan/str: fix warnings. Firstly, -Wwrite-strings makes string literals const, secondly, we mustn't define str_strstr etc in terms of themselves! Signed-off-by: Rusty Russell (Imported from CCAN commit 0845e79650c9257aa0ddef8ff99fd815b5edffac) --- lib/ccan/str/test/run.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib/ccan/str/test/run.c') diff --git a/lib/ccan/str/test/run.c b/lib/ccan/str/test/run.c index a15654f8f3..f253746e7b 100644 --- a/lib/ccan/str/test/run.c +++ b/lib/ccan/str/test/run.c @@ -6,7 +6,8 @@ #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof(arr[0])) -static char *substrings[] = { "far", "bar", "baz", "b", "ba", "z", "ar", NULL }; +static const char *substrings[] = { "far", "bar", "baz", "b", "ba", "z", "ar", + NULL }; #define NUM_SUBSTRINGS (ARRAY_SIZE(substrings) - 1) -- cgit