Bug 18038

Summary: patch to avoid gcc warning in libXext
Product: xorg Reporter: Peter Breitenlohner <peb>
Component: Lib/XextAssignee: Xorg Project Team <xorg-team>
Status: RESOLVED FIXED QA Contact: Xorg Project Team <xorg-team>
Severity: normal    
Priority: medium Keywords: patch
Version: 7.3 (2007.09)   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:
Attachments:
Description Flags
patch to avoid gcc warning in libXext-1.0.4 none

Description Peter Breitenlohner 2008-10-13 02:04:26 UTC
Created attachment 19616 [details] [review]
patch to avoid gcc warning in libXext-1.0.4

Attached is a small patch to avoid the (only) gcc warning in libXext (V 1.0.4)
    ../../libXext-1.0.4/src/extutil.c:272: warning: passing arg 2 of pointer to          function discards qualifiers from pointer target type

It's nice that you have added proper prototypes somewhere between V 1.0.2 and V 1.0.4, but unfortunately that now causes a compiler warning.

The handler may do many things, but it certainly must not modify the strings
passed to it as arg 2 (ext_name) and arg 3 (reason).

IMHO, the proper way to handle all this is to declare a function pointer type in
Xext.h and then use that type in extutil.c and globals.c.

If that makes it necessary to create new versions xextproto-7.0.4 and
libXext-1.0.5 (requiring xextproto >= 7.0.4), so be it.
Comment 1 Paulo César Pereira de Andrade 2009-01-29 11:35:02 UTC
  Thanks for the patch.

It was corrected in commit
52cf9c06819d94e178285d75de6434e98358b63d
and a new version of xextproto (7.0.5) with
the required header changes released.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.