[PATCH:libXScrnSaver] Don't declare a 'const char *' when you pass it to a 'char *'.

Alan Coopersmith alan.coopersmith at oracle.com
Sun Jun 2 16:26:44 PDT 2013


On 06/ 2/13 11:56 AM, Thomas Klausner wrote:
> ---
>   src/XScrnSaver.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/XScrnSaver.c b/src/XScrnSaver.c
> index 2a89246..bf53c03 100644
> --- a/src/XScrnSaver.c
> +++ b/src/XScrnSaver.c
> @@ -36,7 +36,7 @@ in this Software without prior written authorization from the X Consortium.
>
>   static XExtensionInfo _screen_saver_info_data;
>   static XExtensionInfo *screen_saver_info = &_screen_saver_info_data;
> -static const char *screen_saver_extension_name = ScreenSaverName;
> +static char *screen_saver_extension_name = ScreenSaverName;
>
>   #define ScreenSaverCheckExtension(dpy,i,val) \
>     XextCheckExtension (dpy, i, screen_saver_extension_name, val)
>

This should not be necessary since libXext was modified to take a const char:
http://cgit.freedesktop.org/xorg/lib/libXext/commit/?id=c0c2a0c7819c425f3df0992b6873a15c8ec27e01

I get no const mismatch warnings building current libXScrnSaver sources with gcc.

-- 
	-Alan Coopersmith-              alan.coopersmith at oracle.com
	 Oracle Solaris Engineering - http://blogs.oracle.com/alanc


More information about the xorg-devel mailing list