xserver-multidpi/os
Alan Coopersmith 50b1097643 Constify the reason string throughout the authorization check framework
Almost all of the places the string is assigned point to a literal
string constant, so use const char * for those, and const char **
for function calls that return it via an argument.   Fortunately
the top level function, ClientAuthorized, which returns the string
as its return value is called from only one place, ProcEstablishConnection.

ProcEstablishConnection stores either that return value or a string literal
in char *reason.  It only uses reason as an argument to SendConnSetup.
SendConnSetup passes the reason argument to strlen & WriteToClient,
both of which already have const qualifiers on their args.
Thus added const to the reason variable in ProcEstablishConnection
and the reason argument to SendConnSetup.

Fixes gcc warnings:
dispatch.c: In function 'ProcEstablishConnection':
dispatch.c:3711:9: warning: assignment discards qualifiers from pointer target type
auth.c: In function 'CheckAuthorization':
auth.c:218:14: warning: assignment discards qualifiers from pointer target type
auth.c:220:20: warning: assignment discards qualifiers from pointer target type
connection.c: In function 'ClientAuthorized':
connection.c:683:3: warning: return discards qualifiers from pointer target type
mitauth.c: In function 'MitCheckCookie':
mitauth.c:88:13: warning: assignment discards qualifiers from pointer target type
xdmauth.c:259:14: warning: assignment discards qualifiers from pointer target type
xdmauth.c:270:14: warning: assignment discards qualifiers from pointer target type
xdmauth.c:277:11: warning: assignment discards qualifiers from pointer target type
xdmauth.c:293:15: warning: assignment discards qualifiers from pointer target type
xdmauth.c:313:14: warning: assignment discards qualifiers from pointer target type
xdmauth.c:322:11: warning: assignment discards qualifiers from pointer target type
rpcauth.c: In function 'SecureRPCCheck':
rpcauth.c:136:10: warning: assignment discards qualifiers from pointer target type

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Jamey Sharp <jamey@minilop.net>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2011-12-12 17:03:10 -08:00
..
.gitignore dix and os: gitignore dix.O and os.O 2011-09-23 17:14:47 -07:00
access.c os/access.c: replace acmp & acopy macros with memcmp & memcpy calls 2011-12-12 17:03:09 -08:00
auth.c Constify the reason string throughout the authorization check framework 2011-12-12 17:03:10 -08:00
backtrace.c os: Remove Error() 2011-10-11 21:23:46 -07:00
client.c Convert DetermineClientCmd to use strdup instead of malloc+strncpy 2011-11-23 12:15:05 -08:00
connection.c Constify the reason string throughout the authorization check framework 2011-12-12 17:03:10 -08:00
io.c record: Prevent out of bounds access when recording a reply. 2011-11-18 11:26:02 -08:00
log.c LogVMessageVerb: Fix const mismatch warning 2011-11-23 12:15:06 -08:00
Makefile.am Move to autoconf standard function name checks & defines 2011-12-05 14:32:45 -08:00
mitauth.c Constify the reason string throughout the authorization check framework 2011-12-12 17:03:10 -08:00
oscolor.c Rework symbol visibility for easier maintenance 2008-12-03 05:43:34 -02:00
osdep.h Constify the reason string throughout the authorization check framework 2011-12-12 17:03:10 -08:00
osinit.c Convert a bunch of sprintf to snprintf calls 2011-11-23 12:15:06 -08:00
rpcauth.c Constify the reason string throughout the authorization check framework 2011-12-12 17:03:10 -08:00
strcasecmp.c Move to autoconf standard function name checks & defines 2011-12-05 14:32:45 -08:00
strcasestr.c Move to autoconf standard function name checks & defines 2011-12-05 14:32:45 -08:00
strlcat.c os: include dix-config.h, not xorg-config.h 2010-11-11 08:41:38 +10:00
strlcpy.c Move to autoconf standard function name checks & defines 2011-12-05 14:32:45 -08:00
strndup.c Add fallback implementation of strndup() 2011-11-23 12:15:05 -08:00
utils.c Mark arguments to fopen/popen/system wrappers as const char * 2011-11-23 12:15:06 -08:00
WaitFor.c os: Reduce smart scheduler setup calls 2011-01-20 21:08:17 -05:00
xdmauth.c Constify the reason string throughout the authorization check framework 2011-12-12 17:03:10 -08:00
xdmcp.c Convert a bunch of sprintf to snprintf calls 2011-11-23 12:15:06 -08:00
xprintf.c os: Remove Error() 2011-10-11 21:23:46 -07:00
xsha1.c Replace X-allocation functions with their C89 counterparts 2010-05-13 00:22:37 +07:00
xstrans.c os: Silence warnings when building with clang 2011-04-25 10:45:34 -07:00