i use cppchecker 1.58, on win7, i can't use above because of 1 DLL that cames with Visual Studio.
when i select a folder, the file .h is found and the error check starts.
but i get an error syntax on these line(3057(now it's a diferent line):
(that line is for show that i don't have any error on code\compiler)
i don't know work with options.. maybe you can help me just for test the memory leaks.
can guide me to right place for fix my problem :(
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
It seems that the real problem is somewhere else. Can you try to reduce the source code?
That code is written in a function. What happens if you copy the code in this function and paste it in a new file.. and then run cppcheck on that file, do you still get the syntax error?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
As I posted here, the error might be coming from another header file and carrying over into this one. Currently, it seems that once cppcheck includes all files, it isn't really sure when one file begins and one file ends, so if you're "missing a semicolon" from a previous file, then it might show that error in the next file in the list, on the next available line.
You can test this by commenting out the line giving you an error and adding another simpler line to it, such as int nothing = 0;. If that line shows up as a syntax error, then your "error" is definitely either on the previous line or in another file.
Good luck!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
i use cppchecker 1.58, on win7, i can't use above because of 1 DLL that cames with Visual Studio.
when i select a folder, the file .h is found and the error check starts.
but i get an error syntax on these line(3057(now it's a diferent line):
HFONT hlf =(HFONT) GetCurrentObject(hdc,OBJ_FONT);
(that line is for show that i don't have any error on code\compiler)
i don't know work with options.. maybe you can help me just for test the memory leaks.
can guide me to right place for fix my problem :(
I don't know why you get syntax error.
can you try to prevent that .h file is found?
There is no problems there.
It seems that the real problem is somewhere else. Can you try to reduce the source code?
That code is written in a function. What happens if you copy the code in this function and paste it in a new file.. and then run cppcheck on that file, do you still get the syntax error?
As I posted here, the error might be coming from another header file and carrying over into this one. Currently, it seems that once cppcheck includes all files, it isn't really sure when one file begins and one file ends, so if you're "missing a semicolon" from a previous file, then it might show that error in the next file in the list, on the next available line.
You can test this by commenting out the line giving you an error and adding another simpler line to it, such as
int nothing = 0;
. If that line shows up as a syntax error, then your "error" is definitely either on the previous line or in another file.Good luck!