On Fri, 16 Feb 2018 23:40:22 +0100 Arnd Bergmann arnd@arndb.de wrote:
((CAPI_MSG *) msg)->info.facility_req.structs[1] =
LI_REQ_SILENT_UPDATE & 0xff; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/isdn/hardware/eicon/message.c:11163:54: error: array subscript is above array bounds [-Werror=array-bounds] ((CAPI_MSG *) msg)->info.facility_req.structs[2] = LI_REQ_SILENT_UPDATE >> 8; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/isdn/hardware/eicon/message.c:11164:54: error: array subscript is above array bounds [-Werror=array-bounds] ((CAPI_MSG *) msg)->info.facility_req.structs[3] = 0;
All those are nonsense AFAICT, and we see them only because the "if()" override ends up confusing gcc's value-range tracking in the same way it used to cause lots of -Wmaybe-uninitialized warnings (which we just disable these days with PROFILE_ALL_BRANCHES).
I'm fine with your patch then.
-- Steve