Hi All,
Here a false positive in cppcheck 2.10 misra.py addon which is related to #10499 which was fixed in https://github.com/danmar/cppcheck/commit/3c1ae779628964735bf18b6c70f317825a8d470f
In this case however the array is inside a struct:
typedef struct { char data[24]; } MyStruct_t; void UsingStruct(void); void UsingStruct(void) { static MyStruct_t s_myStruct; if (s_myStruct.data[0] == '\0') /* false positive: [misra-c2012-10.4] */ { ; } }
Thanks for reporting!
I have created https://trac.cppcheck.net/ticket/11756
created https://github.com/danmar/cppcheck/pull/5160
Log in to post a comment.
Hi All,
Here a false positive in cppcheck 2.10 misra.py addon which is related to #10499 which was fixed in https://github.com/danmar/cppcheck/commit/3c1ae779628964735bf18b6c70f317825a8d470f
In this case however the array is inside a struct:
Thanks for reporting!
I have created https://trac.cppcheck.net/ticket/11756
created https://github.com/danmar/cppcheck/pull/5160