> 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

Reply via email to