cppcheck 1.90
In this little code, the format string does not match the parameter type. In the first call for CString::Format, this is detected as warning (invalidPrintfArgType_sint), but in the 2nd example inside a struct it is not detected.
typedef struct { CString st; } my_struct_t; void my_func(void) { CString my_string; double d = 3.1415; my_string.Format("%d", d); my_struct_t my_struct; my_struct.st.Format("%d", d); }
Thanks good catch! I created https://trac.cppcheck.net/ticket/9672
Log in to post a comment.
cppcheck 1.90
In this little code, the format string does not match the parameter type. In the first call for CString::Format, this is detected as warning (invalidPrintfArgType_sint), but in the 2nd example inside a struct it is not detected.
Thanks good catch! I created https://trac.cppcheck.net/ticket/9672