[Mesa-dev] [PATCH] glx: Add GLXBadProfileARB to the error string list

Adam Jackson ajax at redhat.com
Wed Oct 17 12:14:38 PDT 2012


On 10/17/12 2:52 PM, Brian Paul wrote:
> On 10/17/2012 12:38 PM, Adam Jackson wrote:
>> Note: This is a candidate for the stable branches.
>>
>> Signed-off-by: Adam Jackson <ajax at redhat.com>
>> ---
>>   src/glx/glxext.c | 1 +
>>   1 file changed, 1 insertion(+)
>>
>> diff --git a/src/glx/glxext.c b/src/glx/glxext.c
>> index 4d59a06..e55c1c1 100644
>> --- a/src/glx/glxext.c
>> +++ b/src/glx/glxext.c
>> @@ -81,6 +81,7 @@ static /* const */ char *error_list[] = {
>>      "GLXBadPbuffer",
>>      "GLXBadCurrentDrawable",
>>      "GLXBadWindow",
>> +   "GLXBadProfileARB",
>>   };
>>
>>   #ifdef GLX_USE_APPLEGL
>
> Reviewed-by: Brian Paul <brianp at vmware.com>
>
> But could we also add an assertion somewhere to catch missing strings in
> the future?  Like assert(ARRAY_SIZE(error_list) == __GLX_NUMBER_ERRORS)?

Pushed, thanks.  I'll try to come up with a way to make that fail at 
build time, the failure mode for getting this wrong ends up being segfaulty.

- ajax


More information about the mesa-dev mailing list