Re: [PATCH v2] Fix gcc-12 compiler warnings on lkcd_*.c

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

 



On 2022/09/02 14:37, lijiang wrote:
> Thank you for the fix, Kazu.
> 
> On Thu, Sep 1, 2022 at 1:03 PM HAGIO KAZUHITO(萩尾 一仁) <k-hagio-ab@xxxxxxx>
> wrote:
> 
>> Without the patch, the following gcc-12 compiler warnings are emitted
>> for lkcd_*.c:
>>
>> lkcd_v1.c: In function 'dump_lkcd_environment_v1':
>> lkcd_v1.c:252:20: warning: the comparison will always evaluate as 'true'
>> for the address of 'dh_panic_string' will never be NULL [-Waddress]
>>      252 |                 dh && dh->dh_panic_string &&
>>          |                    ^~
>> In file included from lkcd_v1.c:21:
>> lkcd_vmdump_v1.h:108:30: note: 'dh_panic_string' declared here
>>      108 |         char                 dh_panic_string[DUMP_PANIC_LEN];
>>          |                              ^~~~~~~~~~~~~~~
>> ...
>>
>> Reported-by: Lianbo Jiang <lijiang@xxxxxxxxxx>
>> Signed-off-by: Kazuhito Hagio <k-hagio-ab@xxxxxxx>
>> ---
>> v2
>> - fixed typo
>>
>>     lkcd_v1.c    | 3 +--
>>     lkcd_v2_v3.c | 3 +--
>>     lkcd_v5.c    | 3 +--
>>     lkcd_v7.c    | 3 +--
>>     lkcd_v8.c    | 3 +--
>>     5 files changed, 5 insertions(+), 10 deletions(-)
>>
>>
> This looks good, and these warnings disappear. So for the v2: Ack.

Thanks, applied.
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