Commit 537d4157 authored by David Woodhouse's avatar David Woodhouse

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: default avatarDavid Woodhouse <David.Woodhouse@intel.com>
parent a61ae9f5
......@@ -71,7 +71,7 @@
#include <libintl.h>
#define _(s) dgettext("openconnect", s)
#else
#define _(s) s
#define _(s) ((char *)(s))
#endif
#define N_(s) s
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment