You're right. Thought I tried it but overlooked the analyzer warnings warnings not always get regenerated.. Thanks!
On 10.02.14 14:03, "Dmitri Gribenko" <griboz...@gmail.com> wrote: >On Mon, Feb 10, 2014 at 10:34 AM, Thomas Engelmeier ><tengelme...@blackberry.com> wrote: >> Next question: ! get a bunch of errors about pointers not checked for >>NULL >> in code like this. I tried variations of decorating My_LogAssertFailed >> with noreturn, putting the abort directly in the macro etc. How does the >> clang static analyzer see there is actually an check against NULL? >> >> TIA, >> Thomas >> >> #define MY_ASSERT(condition) do { if (!(condition)) >> My_LogAssertFailed(__FILE__, __LINE__, __FUNCTION__, #condition); } >>while >> (0) >> >> My_LogAssertFailed( const char *file, int line, const char *function, >> const char *condition ) { >> >> // … >> abort(); >> } > >Marking My_LogAssertFailed as __attribute__((noreturn)) should fix >this, I think. > >Dmitri > >-- >main(i,j){for(i=2;;i++){for(j=2;j<i;j++){if(!(i%j)){j=0;break;}}if >(j){printf("%d\n",i);}}} /*Dmitri Gribenko <griboz...@gmail.com>*/ _______________________________________________ cfe-users mailing list cfe-users@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/cfe-users