Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
IAR: Suppress C "bypasses initialization" warning #7261
By default IAR generates "transfer of control bypasses initialization"
Suppress the warning for C only, to align with GCC and ARMCC. Have to
Pull request type
Instead of suppressing warnings for all C files, shouldn;t we suppress them for relevant files only as done for other compilers here
I would suggest change as below:
Also please check if we have warnings for GNU ARM compiler as well?
Build number : 2390
Build number : 2027
Jun 20, 2018
14 checks passed
@deepikabhavnani - thanks for that - I'd forgotten we did already have a suppression inside Nanostack for ARMCC. GCC does not warn about this, so there's no suppression needed.
Had I remembered, I might have added it in there, but I think the
Possible warning workarounds are:
Of those, only 3 is actually an improvement to the code, but can make a mess of your source layout, to the extent it's usually not worthwhile, except if it's
This does mean we're now inconsistent - the warning will be present outside Nanostack for ARMCC only. We should resolve that either by limiting this suppression to Nanostack, or adding it to ARMCC globally. I vote for the latter.