Hello, I've just upgraded a codebase using cppcheck 2.10 to 2.17.1 and then 2.19.1 and have run into an error that I haven't be able to solve, but I have identified the root cause.
It correctly evaluates the size if you replace sizeof(MyStruct_t) with a primitive like sizeof(float); however, it fails to evaluate the size of any given struct.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello, I've just upgraded a codebase using cppcheck 2.10 to 2.17.1 and then 2.19.1 and have run into an error that I haven't be able to solve, but I have identified the root cause.
Consider the following code:
When evaluated on version 2.17.1 or higher (tested 2.17.1, 2.19, 2.19.1), it gives the following error:
It correctly evaluates the size if you replace
sizeof(MyStruct_t)with a primitive likesizeof(float); however, it fails to evaluate the size of any given struct.