[PATCH] incorrect arguments designated in -Wnonnull for arrays

Martin Sebor msebor@gmail.com
Tue Jul 27 16:55:08 GMT 2021


On 7/26/21 12:22 PM, Jeff Law via Gcc-patches wrote:
> 
> 
> On 7/25/2021 10:23 AM, Uecker, Martin wrote:
>> Two arguments are switched for -Wnonnull when
>> warning about array parameters with bounds > 0
>> and which are NULL.
>>
>> This patch corrects the mistake.
>>
>> Martin
>>
>>
>> 2021-07-25  Martin Uecker  <muecker@gwdg.de>
>>
>> gcc/
>>       * calls.c (maybe_warn_rdwr_sizes): Correct argument
>>       numbers in warning that were switched.
>>
>> gcc/testsuite/
>>       * gcc.dg/Wnonnull-4.c: Correct argument numbers in warnings.
> I'll defer to Martin Sebor on this.
> 
> Martin S., can you cover the review of this patch from Martin U?

The patch is correct.  Thanks for the fix!  It would ideally go
into GCC 11 as well.

Martin


More information about the Gcc-patches mailing list