[LU-17104] build fix for gcc12 Created: 09/Sep/23 Updated: 23/Sep/23 Resolved: 23/Sep/23 |
|
| Status: | Resolved |
| Project: | Lustre |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | Lustre 2.16.0 |
| Type: | Bug | Priority: | Minor |
| Reporter: | Shaun Tancheff | Assignee: | Shaun Tancheff |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Severity: | 3 |
| Rank (Obsolete): | 9223372036854775807 |
| Description |
|
Building master with gcc12 hit: /home/shaun/lustre-release/lustre/quota/qmt_entry.c: In function ‘qti_lqes_restore_init’:
/home/shaun/lustre-release/lustre/quota/qmt_entry.c:1060:21: error: the comparison will always evaluate as ‘true’ for the address of ‘qti_lqes_rstr_small’ will never be NULL [-Werror=address]
1060 | if (!qti_lqes_rstr(env))
| ^
In file included from /home/shaun/lustre-release/lustre/quota/qmt_entry.c:33:
/home/shaun/lustre-release/lustre/quota/qmt_internal.h:242:41: note: ‘qti_lqes_rstr_small’ declared here
242 | struct qmt_lqe_restore qti_lqes_rstr_small[QMT_MAX_POOL_NUM];
| ^~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
Which suggests that the if condition is using the wrong variable, probably should do: OBD_ALLOC(qmt_info(env)->qti_lqes_rstr,
qti_lqes_cnt(env) * sizeof(struct qmt_lqe_restore));
- if (!qti_lqes_rstr(env))
+ if (!qmt_info(env)->qti_lqes_rstr)
rc = -ENOMEM;
|
| Comments |
| Comment by Gerrit Updater [ 09/Sep/23 ] |
|
"Shaun Tancheff <shaun.tancheff@hpe.com>" uploaded a new patch: https://review.whamcloud.com/c/fs/lustre-release/+/52328 |
| Comment by Gerrit Updater [ 09/Sep/23 ] |
|
"Shaun Tancheff <shaun.tancheff@hpe.com>" uploaded a new patch: https://review.whamcloud.com/c/fs/lustre-release/+/52330 |
| Comment by Gerrit Updater [ 23/Sep/23 ] |
|
"Oleg Drokin <green@whamcloud.com>" merged in patch https://review.whamcloud.com/c/fs/lustre-release/+/52330/ |
| Comment by Peter Jones [ 23/Sep/23 ] |
|
Landed for 2.16 |