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

Re: fixes 17-04-2012

From: Stefan Küng <tortoisesvn_at_gmail.com>
Date: Tue, 17 Apr 2012 20:38:05 +0200

On 17.04.2012 10:40, abel_at_abel.hu wrote:
> Hi,
>
> some more fixes plus a bug:
>
> suggestmgr
> - missing check (just like in ngram) caused a possible negative index
> into an array
>
> SVNReadProperties
> - temporary std::string usage fixed
>
> DeadCodes
> - several dead codes removed
>
> fallthrough
> - intentional fallthrough should be marked

Committed in r22801.

> Please notice, there's a serious bug in
> CSVNProgressDlg::IsCommittingToTag(CString& url):
>
> 3445 bool CSVNProgressDlg::IsCommittingToTag(CString& url)
> 3446 {
> 3447 bool isTag = false;
> Logically dead code (DEADCODE) After this line, the value of
> "bURLFetched" is equal to 0.
> Assigning: "bURLFetched" = "false".
> 3448 bool bURLFetched = false;
> 3449 for (int i=0; i<m_targetPathList.GetCount(); ++i)
> 3450 {
> On this path, the condition "bURLFetched" cannot be true.
> 3451 if (bURLFetched)
> Execution cannot reach this statement "continue;".
> 3452 continue;
>
> After careful inspection I found that there's a hardwired break at the
> end of the for cycle, so it's true that although bURLFetched is set
> once after the condition, but never used again.
> This also means that only the first element of m_targetPathList is
> examined, the rest of them will never be examined.
> I don't really know what's the purpose here, so I let you to correct
> it either way: remove bURLFetched completely and replace the for cycle
> with a condition, or delete the break at the end of the for cycle (and
> possibly make more modifications in this function).

Improved that function in r22802.

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=2949205
To unsubscribe from this discussion, e-mail: [dev-unsubscribe_at_tortoisesvn.tigris.org].
Received on 2012-04-17 20:38:13 CEST

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