Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
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 <David.Woodhouse@intel.com>
  • Loading branch information
David Woodhouse authored and David Woodhouse committed Dec 30, 2013
1 parent a61ae9f commit 537d415
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion openconnect-internal.h
Expand Up @@ -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

Expand Down

0 comments on commit 537d415

Please sign in to comment.