From 537d415715c5a1cb94768fb70140d1d8b302ef59 Mon Sep 17 00:00:00 2001 From: David Woodhouse Date: Mon, 30 Dec 2013 21:58:31 +0000 Subject: [PATCH] Fix const warnings in stoken code with NLS disabled The gettext() function will return a non-const 'char *' pointer, and we should have a cast in the dummy version of the _() macro to do the same. Otherwise, we get: ../auth.c: In function 'prepare_stoken': ../auth.c:907:15: warning: assignment discards 'const' qualifier from pointer target type [enabled by default] ../auth.c:915:14: warning: assignment discards 'const' qualifier from pointer target type [enabled by default] ../auth.c:922:14: warning: assignment discards 'const' qualifier from pointer target type [enabled by default] ../auth.c:929:14: warning: assignment discards 'const' qualifier from pointer target type [enabled by default] Based on a patch from Kevin Cernekee. Signed-off-by: David Woodhouse --- openconnect-internal.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openconnect-internal.h b/openconnect-internal.h index 4dc9ed49..3bec18e4 100644 --- a/openconnect-internal.h +++ b/openconnect-internal.h @@ -71,7 +71,7 @@ #include #define _(s) dgettext("openconnect", s) #else -#define _(s) s +#define _(s) ((char *)(s)) #endif #define N_(s) s