summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2011-10-06 22:50:27 -0700
committerAlan Coopersmith <alan.coopersmith@oracle.com>2011-10-06 22:50:27 -0700
commitc24ac15bfa150aeed51d9ec5cb9f2a5054e6f91d (patch)
tree8c60812023f2709fabaf72e6a016468150a5ea12
parent063daed4b43090a3e37f29e9796ffce0861573f1 (diff)
Add const attributes to fix gcc -Wwrite-strings warnings
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-rw-r--r--io.c4
-rw-r--r--misc.c2
-rw-r--r--pm.c2
3 files changed, 4 insertions, 4 deletions
diff --git a/io.c b/io.c
index da006b2..99335e7 100644
--- a/io.c
+++ b/io.c
@@ -57,7 +57,7 @@ X Window System is a trademark of The Open Group.
/*
* Error messages returned to clients who are denied access
*/
-static char * server_reason[2] = {
+static const char * server_reason[2] = {
"Authentication rejected",
"permission denied"
};
@@ -693,7 +693,7 @@ ProcessClientWaiting (
fd_set * winit,
int client_idx)
{
- char * conn_auth_name = "XC-QUERY-SECURITY-1";
+ const char * conn_auth_name = "XC-QUERY-SECURITY-1";
int conn_auth_namelen;
int conn_auth_datalen;
xConnClientPrefix client;
diff --git a/misc.c b/misc.c
index 760069a..46d8e75 100644
--- a/misc.c
+++ b/misc.c
@@ -52,7 +52,7 @@ static Bool HaveSitePolicy = 0;
/*ARGSUSED*/
static void
BadSyntax(
- char *msg,
+ const char *msg,
int line)
{
#ifdef DEBUG
diff --git a/pm.c b/pm.c
index 5735c01..b81a39f 100644
--- a/pm.c
+++ b/pm.c
@@ -98,7 +98,7 @@ void FWPprocessMessages(
struct sockaddr_in server_sockaddr_in;
struct sockaddr_in dummy_sockaddr_in;
char * server_name_base;
- char * config_failure = "unrecognized server or permission denied";
+ const char * config_failure = "unrecognized server or permission denied";
char * tmp_str;
int rule_number = -1;
char * colon;