Re: [hnaz-linux-mm:master 169/698] include/linux/string.h:307:9: note: in expansion of macro '__underlying_strncpy'

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Andrew,

>> include/linux/string.h:297:30: warning: '__builtin_strncpy' specified bound 8 equals destination size [-Wstringop-truncation]
>> 297 | #define __underlying_strncpy __builtin_strncpy
>> |                              ^
>> >> include/linux/string.h:307:9: note: in expansion of macro '__underlying_strncpy'
>> 307 |  return __underlying_strncpy(p, q, size);
>> |         ^~~~~~~~~~~~~~~~~~~~
>
> Looks like another false positive.
>
> Daniel, is there a practical way of suppressing these?

I think we probably want '-Wno-stringop-truncation'. That will stop
warnings where the bound equals the destination size (so there won't be
any null-truncation). But it won't stop the overflow warnings about
full-on overflows (-Wstringop-overflow).

I'll send a patch.

Regards,
Daniel





[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux