From eb9a8904fbef61a57ff01c90627ead57055ed62b Mon Sep 17 00:00:00 2001 From: Alan Coopersmith Date: Sun, 25 Sep 2011 11:18:26 -0700 Subject: Add const attributes to fix gcc -Wwrite-strings warnings Signed-off-by: Alan Coopersmith Reviewed-by: Jeremy Huddleston --- Xtrans.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'Xtrans.c') diff --git a/Xtrans.c b/Xtrans.c index 379cf33..522e543 100644 --- a/Xtrans.c +++ b/Xtrans.c @@ -150,7 +150,7 @@ TRANS(FreeConnInfo) (XtransConnInfo ciptr) #define PROTOBUFSIZE 20 static Xtransport * -TRANS(SelectTransport) (char *protocol) +TRANS(SelectTransport) (const char *protocol) { char protobuf[PROTOBUFSIZE]; @@ -203,7 +203,8 @@ TRANS(ParseAddress) (char *address, char **protocol, char **host, char **port) */ char *mybuf, *tmpptr; - char *_protocol, *_host, *_port; + const char *_protocol; + char *_host, *_port; char hostnamebuf[256]; int _host_len; @@ -759,7 +760,7 @@ TRANS(CreateListener) (XtransConnInfo ciptr, char *port, unsigned int flags) } int -TRANS(NoListen) (char * protocol) +TRANS(NoListen) (const char * protocol) { Xtransport *trans; -- cgit v1.2.1