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

Re: svn commit: r11155 - in trunk/subversion: clients/cmdline include libsvn_client libsvn_ra_dav libsvn_ra_local libsvn_ra_svn libsvn_repos mod_dav_svn svnserve tests/clients/cmdline/getopt_tests_data

From: Philip Martin <philip_at_codematters.co.uk>
Date: 2004-09-28 04:24:56 CEST

Garrett Rooney <rooneg@electricjellyfish.net> writes:

> Philip Martin wrote:
>
>>> /* Parse the arguments. */
>>>- SVN_ERR(svn_ra_svn_parse_tuple(params, pool, "l(?r)(?r)bb", &paths,
>>>+ SVN_ERR(svn_ra_svn_parse_tuple(params, pool, "l(?r)(?r)bb?n", &paths,
>>> &start_rev, &end_rev, &changed_paths,
>>>- &strict_node));
>>>+ &strict_node, &limit));
>>>+ if (limit == SVN_RA_SVN_UNSPECIFIED_NUMBER)
>> ../svn/subversion/svnserve/serve.c: In function `log_cmd':
>> ../svn/subversion/svnserve/serve.c:897: warning: comparison between signed and unsigned
>> Should limit be apr_uint64_t rather than int?
>>
>
> Interesting. I don't see that warning here (of course not, Murphy's

gcc -Wsign-compare

> Law dictates that such things should only show up on someone else's
> machine). I suppose it should, since that's what
> svn_ra_svn_parse_tuple will be expecting. I will need to pass it into
> svn_repos_get_log3 eventually though, will a simple cast to int be
> correct in that case?

You risk having values greater than INT_MAX converted into negative
numbers (and the svn_repos_get_log3 documentation doesn't say what
happens if limit is negative :)

Of course values greater than INT_MAX won't occur if you are starting
with an int in the first place... which raises a question about
ra_svn_log2: it's probably not valid to pass an int to
svn_ra_svn_write_tuple with an "n" format, as that will attempt to
retrieve 8 bytes from the varargs when only 4 bytes have been passed.

-- 
Philip Martin
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue Sep 28 04:25:18 2004

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.