From 99998196017ef38ec88459b50605aa20f628788b Mon Sep 17 00:00:00 2001 From: Alan Coopersmith Date: Mon, 12 Dec 2011 16:49:33 -0800 Subject: Constify string for authorization protocol names gcc was warning from storing string constants in a char *name field: auth.c:64:1: warning: initialization discards qualifiers from pointer target type auth.c:72:1: warning: initialization discards qualifiers from pointer target type auth.c:81:1: warning: initialization discards qualifiers from pointer target type Making the field const requires changing AuthorizationFromID to take a const char ** pointer for the name argument which it sets to point to the matching name entry. Changing that argument requires changing its sole caller in the security extension to pass the address of a const char * variable to it, which it can do, since the only thing it does with the returned name is to pass it back to the RemoveAuthorization function that already expects a const char *name. Signed-off-by: Alan Coopersmith Reviewed-by: Jamey Sharp Reviewed-by: Peter Hutterer --- Xext/security.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'Xext') diff --git a/Xext/security.c b/Xext/security.c index 6fc1eafdd..63892aa85 100644 --- a/Xext/security.c +++ b/Xext/security.c @@ -171,7 +171,8 @@ SecurityDeleteAuthorization( { SecurityAuthorizationPtr pAuth = (SecurityAuthorizationPtr)value; unsigned short name_len, data_len; - char *name, *data; + const char *name; + char *data; int status; int i; OtherClientsPtr pEventClient; -- cgit v1.2.3