Actions
Bug #15701
closedvr: the comparison will always evaluate as 'false'
Start date:
Due date:
% Done:
100%
Estimated time:
Difficulty:
Bite-size
Tags:
Gerrit CR:
External Bug:
Description
Build error with gcc 12:
../../common/io/vr/vr.c: In function 'vr_bus_config': ../../common/io/vr/vr.c:657:33: error: the comparison will always evaluate as 'false' for the address of 'name' will never be NULL [-Werror=address] 657 | if (vrp->chip.info.name == NULL) { | ^~ In file included from ../../common/io/vr/vr.c:54: ../../common/io/vr/vr.h:355:25: note: 'name' declared here 355 | char name[128]; | ^~~~ cc1: all warnings being treated as errors
Since the 'name' can not be NULL, we do have few alternate options there, however, the comment does tell us the intent for this if statement and therefore we should check if the 'name' has empty string. Of course, since I do not have this specific hardware, I am in a bit of trouble there about validating this.
Testing done: build/install/boot, but as noted above, no actual hw to test.
Updated by Toomas Soome 3 days ago
- Status changed from In Progress to Pending RTI
Updated by Electric Monk 2 days ago
- Status changed from Pending RTI to Closed
- % Done changed from 90 to 100
git commit cfe080a1defba131f29718575514514863f007ed
commit cfe080a1defba131f29718575514514863f007ed Author: Toomas Soome <tsoome@me.com> Date: 2023-06-02T21:16:06.000Z 15701 vr: the comparison will always evaluate as 'false' Reviewed by: Robert Mustacchi <rm+illumos@fingolfin.org> Approved by: Dan McDonald <danmcd@mnx.io>
Actions