[Xcb] [PATCH xcb-util-image] Fix compilation when NDEBUG is defined

Peter Harris pharris at opentext.com
Wed Feb 6 08:20:56 PST 2013


On 2013-01-30 08:56, Jon TURNEY wrote:
> On 20/12/2012 22:56, Jon TURNEY wrote:
>> XORG_DEFAULT_OPTIONS enables -Werror=return-type
>>
>> xcb_image_get_pixel() and xcb_image_create_native() assume assert(0) is
>> noreturn, and don't return a value in that case.  But assert(0) isn't noreturn
>> if NDEBUG is defined.
>>
>> Fix this by returning a suitable value.
>>
>> (Also, on the MinGW target, assert(0) is non-standard and may return even in the
>> !NDEBUG case, as the C runtime may ask the user if they want to abort or not...)
>>
>> /jhbuild/checkout/xcb/xcb-util-image/image/xcb_image.c: In function 'xcb_image_get_pixel':
>> /jhbuild/checkout/xcb/xcb-util-image/image/xcb_image.c:754:1: error: control reaches end of non-void function [-Wreturn-type]
>> /jhbuild/checkout/xcb/xcb-util-image/image/xcb_image.c: In function 'xcb_image_create_native':
>> /jhbuild/checkout/xcb/xcb-util-image/image/xcb_image.c:190:1: error: control reaches end of non-void function [-Wreturn-type]
> 
> Ping?

Pong.

Sorry, my latency has gotten rather large of late.

Pushed.

Thanks,
 Peter Harris
-- 
               Open Text Connectivity Solutions Group
Peter Harris                    http://connectivity.opentext.com/
Research and Development        Phone: +1 905 762 6001
pharris at opentext.com            Toll Free: 1 877 359 4866


More information about the Xcb mailing list