[PATCH] glu32: avoid assert side effect (Coverity)
Ken Thomases
ken at codeweavers.com
Sat Apr 29 13:28:03 CDT 2017
On Apr 29, 2017, at 12:38 PM, Nikolay Sivov <bunglehead at gmail.com> wrote:
>
> On 29.04.2017 20:34, Marcus Meissner wrote:
>> CID 401313
>>
>> Signed-off-by: Marcus Meissner <marcus at jet.franken.de>
>> ---
>> dlls/glu32/sweep.c | 3 ++-
>> 1 file changed, 2 insertions(+), 1 deletion(-)
>>
>> diff --git a/dlls/glu32/sweep.c b/dlls/glu32/sweep.c
>> index a909e2be33..1248e9f050 100644
>> --- a/dlls/glu32/sweep.c
>> +++ b/dlls/glu32/sweep.c
>> @@ -1287,7 +1287,8 @@ static void DoneEdgeDict( GLUtesselator *tess )
>> */
>> if( ! reg->sentinel ) {
>> assert( reg->fixUpperEdge );
>> - assert( ++fixedEdges == 1 );
>> + ++fixedEdges;
>> + assert( fixedEdges == 1 );
>> }
>> assert( reg->windingNumber == 0 );
>> DeleteRegion( tess, reg );
>>
>
> This particular one has no side effects.
Indeed, the proposed patch will break the build if NDEBUG is defined, because fixedEdges won't be declared.
-Ken
More information about the wine-devel
mailing list