gcc 12.1.0 warns when compiling libosmosim
Since gcc ugprade to 12.1.0 in my system, I get this warning (error due to using -Werror):
libosmocore/src/sim/reader.c:43:13: error: the comparison will always evaluate as 'true' for the pointer operand in 'resp->l2h + ((sizetype)((struct osim_msgb_cb *)&resp->cb)->lc + 5)' must not be NULL
Indeed !msgb_apdu_de(resp) makes no sense, since currently msgb_apdu_de() returns a pointer calculated with offset from first param, so it indeed can never be null
Not sure if the code in get_sw() is expected to dereference the value, or simply that use of !msgb_apdu_de(resp) doesn't make sense at all in there
PS: there's no libosmosim in "Category" in redmine when creating the ticket.