Changes
Started by upstream project gerrit-onomondo-ipa #8
Started 23 hr ago
Queued 7.3 sec
Took 2.4 sec
on build5-deb12build-ansible
utils: ignore Waddress in IPA_STR_FROM_ASN
When building with -Werror, GCC complains about this assert in the macro:
#define IPA_STR_FROM_ASN(asn1_obj) ({ \
char *__str; \
assert(asn1_obj); \ <----------------------
__str = IPA_ALLOC_N((asn1_obj)->size + 1); \
assert(__str); \
memcpy(__str, (asn1_obj)->buf, (asn1_obj)->size); \
__str[(asn1_obj)->size] = '\0'; \
__str; \
})
For example:
…/src/ipa/libipa/es10b_get_eim_cfg_data.c:48:21: error: the comparison will always evaluate as ‘true’ for the address of ‘eimId’ will never be NULL [-Werror=address]
48 | IPA_STR_FROM_ASN(&res->res->eimConfigurationDataList.list.array[i]->eimId);
Add pragmas to ignore the error, so it can still assert if somebody
should pass NULL to the macro.
Change-Id: Ia2ef30880dd3e5b2ab90eedd0046a95a22614a81
When building with -Werror, GCC complains about this assert in the macro:
#define IPA_STR_FROM_ASN(asn1_obj) ({ \
char *__str; \
assert(asn1_obj); \ <----------------------
__str = IPA_ALLOC_N((asn1_obj)->size + 1); \
assert(__str); \
memcpy(__str, (asn1_obj)->buf, (asn1_obj)->size); \
__str[(asn1_obj)->size] = '\0'; \
__str; \
})
For example:
…/src/ipa/libipa/es10b_get_eim_cfg_data.c:48:21: error: the comparison will always evaluate as ‘true’ for the address of ‘eimId’ will never be NULL [-Werror=address]
48 | IPA_STR_FROM_ASN(&res->res->eimConfigurationDataList.list.array[i]->eimId);
Add pragmas to ignore the error, so it can still assert if somebody
should pass NULL to the macro.
Change-Id: Ia2ef30880dd3e5b2ab90eedd0046a95a22614a81
Oliver Smith
at