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

Re: svn commit: r1348770 - /subversion/trunk/subversion/libsvn_subr/pool.c

From: Hyrum K Wright <hyrum.wright_at_wandisco.com>
Date: Mon, 11 Jun 2012 11:36:59 +0200

On Mon, Jun 11, 2012 at 11:33 AM, <ivan_at_apache.org> wrote:
> Author: ivan
> Date: Mon Jun 11 09:33:36 2012
> New Revision: 1348770
>
> URL: http://svn.apache.org/viewvc?rev=1348770&view=rev
> Log:
> Fix compiler warning.
>
> * subversion/libsvn_subr/pool.c
>  (abort_on_pool_failure): Add return statement to make compiler happy.
>
> Modified:
>    subversion/trunk/subversion/libsvn_subr/pool.c
>
> Modified: subversion/trunk/subversion/libsvn_subr/pool.c
> URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_subr/pool.c?rev=1348770&r1=1348769&r2=1348770&view=diff
> ==============================================================================
> --- subversion/trunk/subversion/libsvn_subr/pool.c (original)
> +++ subversion/trunk/subversion/libsvn_subr/pool.c Mon Jun 11 09:33:36 2012
> @@ -53,6 +53,7 @@ abort_on_pool_failure(int retcode)
>      And we don't have any of it... */
>   printf("Out of memory - terminating application.\n");
>   abort();
> +  return 0; /* not reached */
>  }
>
>

This change actually *adds* the following warning for (clang on Darwin):
[[[
clang: warning: argument unused during compilation: '-no-cpp-precomp'
subversion/libsvn_subr/pool.c:56:10: warning: will never be executed
      [-Wunreachable-code]
  return 0; /* not reached */
         ^
1 warning generated.
]]]

I know this isn't the only place in our code where we have such
constructions. Can we do something compiler-specific which then
applies to all such places?

-Hyrum

-- 
uberSVN: Apache Subversion Made Easy
http://www.uberSVN.com/
Received on 2012-06-11 11:37:34 CEST

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.