[PATCH:libICE 3/6] constify arguments to IceGetAuthFileEntry

Alan Coopersmith alan.coopersmith at oracle.com
Wed Nov 9 22:19:52 PST 2011


Needed to clear gcc -Wwrite-strings warnings in callers

Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>
---
 doc/ICElib.xml            |    6 +++---
 include/X11/ICE/ICEutil.h |    6 +++---
 src/authutil.c            |    6 +++---
 3 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/doc/ICElib.xml b/doc/ICElib.xml
index 694afcd..60d9dbe 100644
--- a/doc/ICElib.xml
+++ b/doc/ICElib.xml
@@ -4430,9 +4430,9 @@ protocol_name/network_id/auth_name tuple, use
 <funcsynopsis id='IceGetAuthFileEntry'>
 <funcprototype>
   <funcdef>IceAuthFileEntry<function> *IceGetAuthFileEntry</function></funcdef>
-    <paramdef>char<parameter> *protocol_name</parameter></paramdef>
-    <paramdef>char<parameter> *network_id</parameter></paramdef>
-    <paramdef>char<parameter> *auth_name</parameter></paramdef>
+    <paramdef>const char *<parameter>protocol_name</parameter></paramdef>
+    <paramdef>const char *<parameter>network_id</parameter></paramdef>
+    <paramdef>const char *<parameter>auth_name</parameter></paramdef>
 </funcprototype>
 </funcsynopsis>
 
diff --git a/include/X11/ICE/ICEutil.h b/include/X11/ICE/ICEutil.h
index 2852931..9c6b12f 100644
--- a/include/X11/ICE/ICEutil.h
+++ b/include/X11/ICE/ICEutil.h
@@ -105,9 +105,9 @@ extern Status IceWriteAuthFileEntry (
 );
 
 extern IceAuthFileEntry *IceGetAuthFileEntry (
-    char *		/* protocol_name */,
-    char *		/* network_id */,
-    char *		/* auth_name */
+    const char *	/* protocol_name */,
+    const char *	/* network_id */,
+    const char *	/* auth_name */
 );
 
 extern char *IceGenerateMagicCookie (
diff --git a/src/authutil.c b/src/authutil.c
index 747cacc..6c00482 100644
--- a/src/authutil.c
+++ b/src/authutil.c
@@ -338,9 +338,9 @@ IceWriteAuthFileEntry (
 
 IceAuthFileEntry *
 IceGetAuthFileEntry (
-	char	*protocol_name,
-	char	*network_id,
-	char	*auth_name
+	const char	*protocol_name,
+	const char	*network_id,
+	const char	*auth_name
 )
 {
     FILE    		*auth_file;
-- 
1.7.3.2



More information about the xorg-devel mailing list