Reduce the number of error reports
Status: Alpha
Brought to you by:
akapusti
Currently the code like:
##define INTALIGNMENT offsetof(struct tagIntAlignment, value)
##define REALALIGNMENT offsetof(struct tagRealAlignment, value)
##define POINTERALIGNMENT offsetof(struct tagPointerAlignment, value)
##define NUMERICALIGNMENT (((INTALIGNMENT) > (REALALIGNMENT)) ? (INTALIGNMENT) : (REALALIGNMENT))
##define ALIGNMENT (((NUMERICALIGNMENT) > (POINTERALIGNMENT)) ? (NUMERICALIGNMENT) : (POINTERALIGNMENT))
will generate 3 "Condition in '?:' is constant" warnings for every line that refers to ALIGNMENT in C code, ALL OF THEM LEGITIMATE, and if we further say:
#define BLOCK_HEADER_SIZE (sizeof(BlockHeader) + ((ALIGNMENT - sizeof(BlockHeader) % ALIGNMENT) % ALIGNMENT))
...that will be 9(!) "Condition in '?:' is constant" warnings for every line that mentions BLOCK_HEADER_SIZE.
This is too much. Even if there are several different errors in the same source line, it will do no good to report them all. So, when a message is logged with a given "anchor":
Of course, it the message is a fatal error, then toe application is terminated and the iccue does not arise.