[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Suspicious conditional

From: Stefan Küng <tortoisesvn_at_gmail.com>
Date: Tue, 05 Jul 2011 20:38:03 +0200

On 05.07.2011 11:57, Dmitry wrote:
> Hey.
>
> Currently CSVNProgressDlg::OnContextMenu() contains the following code:
>
> if ((data->action == svn_wc_notify_add)||
> (data->action == svn_wc_notify_update_add)||
> (data->action == svn_wc_notify_commit_added)||
> (data->action == svn_wc_notify_commit_modified)||
> (data->action == svn_wc_notify_restore)||
> (data->action == svn_wc_notify_revert)||
> (data->action == svn_wc_notify_resolved)||
> (data->action == svn_wc_notify_commit_replaced)||
> (data->action == svn_wc_notify_commit_modified)||
> (data->action == svn_wc_notify_commit_postfix_txdelta)||
> (data->action == svn_wc_notify_update_update))
>
> here (data->action == svn_wc_notify_commit_modified) condition is checked twice. Either the second occurence is unneeded or it is mistyped. This defect was detected using PVS-Studio static analysis tool.

Fixed in r21658.

Stefan

-- 
        ___
   oo  // \\      "De Chelonian Mobile"
  (_,\/ \_/ \     TortoiseSVN
    \ \_/_\_/>    The coolest Interface to (Sub)Version Control
    /_/   \_\     http://tortoisesvn.net
------------------------------------------------------
http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=757&dsMessageId=2785031
To unsubscribe from this discussion, e-mail: [dev-unsubscribe_at_tortoisesvn.tigris.org].
Received on 2011-07-05 20:38:13 CEST

This is an archived mail posted to the TortoiseSVN Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.