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

Re: svn commit: r1660269 - in /subversion/branches/1.8.x: ./ STATUS subversion/ subversion/svn/svn.c

From: Evgeny Kotkov <evgeny.kotkov_at_visualsvn.com>
Date: Tue, 17 Feb 2015 13:07:05 +0300

> URL: http://svn.apache.org/r1660269
> Log:
> Merge r1590751 from trunk:
>
> * r1590751
> Use empty, rather than NULL, config if default is unreadable.
> Justification:
> svn SEGV reported by user.
> Votes:
> +1: philip, danielsh, rhuijben
> -0: julianfoad (prefer to fix all the programs at the same time;
> other queries -- see email thread)
> +1: danielsh (julianf: I agree with your points on list, but +1ing anyway:
> fixing this segfault in svn need not block on fixing
> a similar segfault in svnadmin.)

I reverted this changeset in r1660335 (and moved the nomination into the
veto-blocked section), as it breaks the build on Windows and generates new
warnings on *nix:

error C4047: 'return' : 'int' differs in levels of indirection from
  'svn_error_t *' (subversion\svn\svn.c:2522)
error C4047: 'return' : 'int' differs in levels of indirection from
  'svn_error_t *' (subversion\svn\svn.c:2524)

...

subversion/svn/svn.c:2522:11: warning: incompatible pointer to integer
  conversion returning 'svn_error_t *' (aka 'struct svn_error_t *') from a
  function with result type 'int' [-Wint-conversion]
          SVN_ERR(svn_config_create2(&empty_cfg, FALSE, FALSE, pool));
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./subversion/include/svn_error.h:335:14: note: expanded from macro 'SVN_ERR'
      return svn_error_trace(svn_err__temp); \
             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./subversion/include/svn_error.h:353:32: note: expanded from macro
  'svn_error_trace'
#define svn_error_trace(expr) (expr)
                               ^~~~~~
subversion/svn/svn.c:2524:11: warning: incompatible pointer to integer
  conversion returning 'svn_error_t *' (aka 'struct svn_error_t *') from a
  function with result type 'int' [-Wint-conversion]
          SVN_ERR(svn_config_create2(&empty_cfg, FALSE, FALSE, pool));
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./subversion/include/svn_error.h:335:14: note: expanded from macro 'SVN_ERR'
      return svn_error_trace(svn_err__temp); \
             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./subversion/include/svn_error.h:353:32: note: expanded from macro
  'svn_error_trace'
#define svn_error_trace(expr) (expr)
                               ^~~~~~

The reason is that sub_main() in 1.8.x and in trunk have different signatures.
In trunk, it returns svn_error_t *, and in 1.8.x, it is just an int (the error
code). We should probably be using SVN_INT_ERR() instead of SVN_ERR().

Regards,
Evgeny Kotkov
Received on 2015-02-17 11:08:38 CET

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