[cfe-commits] [PATCH] strnlen checker

Lenny Maiorani lenny at Colorado.EDU
Tue Feb 22 08:53:59 PST 2011


On 02/21/2011 09:22 PM, Ted Kremenek wrote:
> I was looking at the test cases, and noticed the following diagnostics:
>
>    +  return strnlen(0, 3); // expected-warning{{Null pointer argument in call to byte string function}}
>
> and
>
>    +  return strnlen((char*)&&label, 3); // expected-warning{{Argument to byte string function is the address of the label 'label', which is not a null-terminated string}}
>
> I know you didn't write these diagnostics, but the term "byte string function" sounds very clinical, and not all that helpful.    It's certainly not a term I'm familiar with (even though I can decipher its meaning).  Do you think we should just say the name of the function instead of an opaque term like "byte string function"?
>
Ted,

Thanks for committing my patches.

I definitely agree that the term "byte string function" is a little 
ambiguous and possibly too proper. Changing that should be straight 
forward provided the CheckerContext knows the function in question. I 
assume it does and I just need to look into it.

Expect a patch sometime soon.

-Lenny




More information about the cfe-commits mailing list