Re: [PATCH 2/4] Fix gcc-11 compilation warning on symbols.c

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

 



On 2022/07/26 15:52, lijiang wrote:>>>> Without the patch, the following gcc-11 compliation warning is emitted
>>>> for symbols.c:
>>>>
>>>> symbols.c: In function 'cmd_p':
>>>> symbols.c:7412:38: warning: writing 1 byte into a region of size 0
>>>> [-Wstringop-overflow=]
>>>>    7412 |                         *(cpuspec-1) = ':';
>>>>         |                         ~~~~~~~~~~~~~^~~~~
>>>>
>>>
>>>
>>> I have one question about it:
>>> This issue only appears in gcc-11 and earlier, I tested it with gcc-12,
>> but
>>> it disappeared. It's interesting.
>> I think that the warning is a false detection.  This patch has no behavior
>> change, just a cosmetic change to avoid the warning.  I'm not sure, but it
>> might be a gcc bug and fixed in gcc-12.
>>
> 
> Probably.  Let's leave it there, if it still appears in the future, we can
> pick it up. Any thoughts?

um, I see the warning on RHEL9, what is your concern about fixing this?
I think it's not bad to suppress this for users/distros using gcc-11,
with the small cosmetic change, not harmful.

> The other three patches look good to me:  Ack.
> [PATCH 1/4] Fix gcc-11 compilation warnings on filesys.c
> [PATCH 3/4] Fix gcc-11 compilation warning on makedumpfile.c
> [PATCH 4/4] Fix gcc-11 compilation warning on kvmdump.c

Thanks!

Kazu
--
Crash-utility mailing list
Crash-utility@xxxxxxxxxx
https://listman.redhat.com/mailman/listinfo/crash-utility
Contribution Guidelines: https://github.com/crash-utility/crash/wiki




[Index of Archives]     [Fedora Development]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [KDE Users]     [Fedora Tools]

 

Powered by Linux