The heap and stack size were reduced in 3.1, try restoring to 3.0 levels 4K and 16K respectively.
3.1 default settings are now 128 bytes and 2K.
System tab in Fitterxxxxx*.cydwr file, workspace explorer near the top.
Into Crerator is integrated Clang which will do some checkings and flags lines in question while typing. Remarkable is for me to see that if(a=b)" (I'm coming from PASCAL world) gets flagged and reminds me to change that line.
Dana, I have checked the heap and stack sizes. Those were set in a previous project and hadn't changed. But good thing to remember!
Thanks Bob, I didn't know what the static analysis too was called. Clang catches most things I'm worried about, and maybe that's sufficient. I'm guessing the culprit is more deep seated than a simple coding error. I've noticed that the issue arrises when the CyBoot 4.20 component is used (rather than 4.11). My guess is it's a constant or definition with regards to the FLASH routines. But just in case, I wanted a static code analysis tool output.
So on that note, have any of you noticed a difference between Clang and PC-Lint?
I would suggest you to google for "GCC lint", some interesting results.