Details
-
Bug
-
Resolution: Fixed
-
Minor
-
None
-
None
-
3
-
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;