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

%lld in svn_string.c

From: Daniel Shahaf <danielsh_at_elego.de>
Date: Sat, 7 May 2011 14:27:04 +0300

Someone added %lld and %llu codes to svn_string.c:

    return svn_error_return(
             svn_error_createf(SVN_ERR_INCORRECT_PARAMS, NULL,
                               _("Number '%s' is out of range '[%lld, %lld]'"),
                               str, minval, maxval));

So, there are two problems here:

* the svn_error_return() isn't needed around svn_error_createf()
  (in fact this file/line appears *three* times in the error stack, not
  just two; but that's another story)

* apr_vformatter() doesn't support the 'll' modifier. When given %l
  followed by something other than 'd' or 'u' (for %ld or %lu, etc) ---
  in our case, followed by 'l' --- it just copies the (first) '%l' and
  discards the second 'l', to the effect of having the following error:

  13:54:21 <@danielsh> subversion/libsvn_subr/svn_string.c:781: (apr_err=200004)
  13:54:21 <@danielsh> svnadmin: E200004: Number '542543543543543543543115' is out of range '[%ld, %ld]'

So, we should remove stop using %lld with apr_pvsprintf() and friends.
Received on 2011-05-07 13:28:25 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.