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

Re: [PATCH] Remove unreachable code in prompt.c

From: Julian Foad <julianfoad_at_btopenworld.com>
Date: Wed, 04 Nov 2009 11:09:44 +0000

On Tue, 2009-11-03 at 22:28 +0800, Edmund Wong wrote:
> Hi,
>
> While compiling on a Windows box, I'd get the following warnings:
>
> c:\svn\subversion\libsvn_subr\prompt.c(64): warning C4702: unreachable code
> c:\svn\subversion\libsvn_subr\prompt.c(71): warning C4702: unreachable code
> c:\svn\subversion\libsvn_subr\prompt.c(72): warning C4702: unreachable code
> c:\svn\subversion\libsvn_subr\prompt.c(74): warning C4702: unreachable code
>
> This patch removes the warnings.
>
> Log as follows
>
> [[[
> Changed the ifdef WIN32 #endif block to an #ifndef WIN32 ... #else .. #endif
> block to avoid the 'unreachable code' warnings in Windows.
>
> * subversion\libsvn_subr\prompt.c
> wait_for_input: Changed #ifdef block to #ifndef block.
>
>
> ]]]

Thanks for the patch. I committed it in r40371, tweaking it to also move
the comment that goes with the "return" statement.

I wrote the log message as:
[[[
Put some code that is unused on Windows into a '#ifndef WIN32' block, to
avoid 'unreachable code' warnings.

* subversion/libsvn_subr/prompt.c
  (wait_for_input): As above.

Patch by: Edmund Wong <ed{_AT_}kdtc.net>
(tweaked by me)
]]]

- Julian

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2414373
Received on 2009-11-04 12:10:15 CET

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

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