summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2011-09-26 16:07:58 -0700
committerAlan Coopersmith <alan.coopersmith@oracle.com>2011-09-28 08:44:32 -0700
commit9a8916cff1f7d20f646d9a80931a5a40ac1592a6 (patch)
treeb96232937f9fbaa78661f11aaeb8b4f06d475e5a
parentdb4fb2da6739a88a4f9773064f7de6c71342ac1b (diff)
Add const attributes to fix gcc -Wwrite-strings warnings
Fixes many, but not all, of the warnings raised by this option Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
-rw-r--r--setxkbmap.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/setxkbmap.c b/setxkbmap.c
index 9bfe0df..cde779c 100644
--- a/setxkbmap.c
+++ b/setxkbmap.c
@@ -81,7 +81,7 @@ static Display *dpy;
* human-readable versions of FROM_CONFIG, FROM_SERVER, etc. Used for error
* reporting.
*/
-static char *srcName[NUM_SOURCES] = {
+static const char *srcName[NUM_SOURCES] = {
"undefined", "X server", "rules file", "config file", "command line"
};
@@ -174,7 +174,7 @@ static int deviceSpec = XkbUseCoreKbd;
/***====================================================================***/
-Bool addToList(list_t *list, char *newVal);
+Bool addToList(list_t *list, const char *newVal);
void usage(int argc, char **argv);
void dumpNames(Bool wantRules, Bool wantCNames);
void trySetString(setting_t * setting, char *newVal, enum source src);
@@ -199,7 +199,7 @@ void printKeymap(void);
*/
Bool
-addToList(list_t *list, char *newVal)
+addToList(list_t *list, const char *newVal)
{
register int i;
@@ -925,7 +925,7 @@ applyRules(void)
/* Primitive sanity check - filter out 'map names' (inside parenthesis) */
/* that can confuse xkbcomp parser */
static Bool
-checkName(char *name, char *string)
+checkName(char *name, const char *string)
{
char *i = name, *opar = NULL;
Bool ret = True;