Menu

#2047 Some issues

open
nobody
None
5
2012-12-21
2010-11-03
No

Hello.

I am write small article: "Static analysis of source code by the example of WinMerge":
http://software.intel.com/en-us/articles/static-analysis-of-source-code-by-the-example-of-winmerge/

In this article a am describe some errors in WinMerge source code. Please read article and check this issues:

V534 It is likely that a wrong variable is being compared inside the 'for' operator. Consider reviewing 'i'. bintrans.cpp 341
V530 The return value of function 'empty' is required to be utilized. diractions.cpp 1312
V530 The return value of function 'empty' is required to be utilized. diractions.cpp 1313
V505 The 'alloca' function is used inside the loop. This can quickly overflow stack. filtercommentsmanager.cpp 52
V505 The 'alloca' function is used inside the loop. This can quickly overflow stack. filtercommentsmanager.cpp 54
V505 The 'alloca' function is used inside the loop. This can quickly overflow stack. filtercommentsmanager.cpp 56
V501 There are identical sub-expressions to the left and to the right of the '||' operator. mergedoc.cpp 1165
V510 The _CrtDbgReport function is not expected to receive class-type variable as sixth actual argument. optionsmgr.cpp 286
V510 The _CrtDbgReport function is not expected to receive class-type variable as sixth actual argument. optionsmgr.cpp 332
V510 The Format function is not expected to receive class-type variable as fourth actual argument.propshell.cpp 104
V510 The Format function is not expected to receive class-type variable as fourth actual argument.propshell.cpp 142
V510 The Format function is not expected to receive class-type variable as fourth actual argument.propshell.cpp 153
V510 The Format function is not expected to receive class-type variable as fifth actual argument.propshell.cpp 179
V523 The 'then' statement is equivalent to the 'else' statement. pcre_exec.c 3899

----
Andrey Karpov,
Cand. Sc. (Physics and Mathematics),
CTO Program Verification Systems Co., Ltd.
URL: www.viva64.com
E-Mail: karpov[@]viva64.com

Discussion

  • Takashi Sawanaka

    Thank you for the report. I committed the fix to SVN.

     
  • Andrey Karpov

    Andrey Karpov - 2011-06-27

    Hello. From the moment of article writing has passed a lot of time. And in our analyzer there was a set of new diagnostic checks. I suggest to try PVS-Studio. We can give you a registration key.

    ----
    Andrey Karpov,
    Cand. Sc. (Physics and Mathematics),
    CTO Program Verification Systems Co., Ltd.
    URL: www.viva64.com
    E-Mail: karpov[@]viva64.com

     

Log in to post a comment.