You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by mark benedetto king <bk...@inquira.com> on 2002/07/29 16:59:50 UTC
Re: [Issue 826] New - Dumper bug (Property-content-length: 0) and fix
On Mon, Jul 29, 2002 at 02:54:45AM -0000, issues@subversion.tigris.org wrote:
> http://subversion.tigris.org/issues/show_bug.cgi?id=826
> +
> +
> + There were two problems. The obvious bug was that apr_off_t variables
> + were being printed using APR_SIZE_T_FMT. The less obvious bug was that
> + proplen was using apr_off_t when the prop string is stored in memory
> + (unnecessary), and also content_length was only apr_size_t when it needs to
> + hold both textlen and proplen. As textlen is (correctly) apr_off_t,
> + content_length needs to be apr_off_t too.
To prevent this from happening again, we should probably add (I think this
is the correct syntax):
Index: subversion/include/svn_io.h
===================================================================
--- subversion/include/svn_io.h
+++ subversion/include/svn_io.h Sun Jul 28 23:17:19 2002
@@ -350,7 +350,9 @@
svn_error_t *svn_stream_printf (svn_stream_t *stream,
apr_pool_t *pool,
const char *fmt,
- ...);
+ ...)
+ __attribute__ ((format (printf, 3, 4)));
+
/* Allocate *STRINGBUF in POOL, and read one line from STREAM into it.
The '\n' is read from the stream, but is not added to the end of
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: [Issue 826] New - Dumper bug (Property-content-length: 0) and fix
Posted by Greg Stein <gs...@lyra.org>.
On Mon, Jul 29, 2002 at 10:28:40PM +0200, Branko Cibej wrote:
> mark benedetto king wrote:
>...
> >+++ subversion/include/svn_io.h Sun Jul 28 23:17:19 2002
> >@@ -350,7 +350,9 @@
> > svn_error_t *svn_stream_printf (svn_stream_t *stream,
> > apr_pool_t *pool,
> > const char *fmt,
> >- ...);
> >+ ...)
> >+ __attribute__ ((format (printf, 3, 4)));
>...
>
> +10, but check how it's done in APR so that this doesn't frighten MSVC.
apr.h has an empty #define for __attribute__ to ensure that this will
compile properly on all non-GCC compilers.
IOW, no special care needed.
Cheers,
-g
--
Greg Stein, http://www.lyra.org/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: [Issue 826] New - Dumper bug (Property-content-length: 0) and
fix
Posted by Branko Čibej <br...@xbc.nu>.
mark benedetto king wrote:
>
>
>On Mon, Jul 29, 2002 at 02:54:45AM -0000, issues@subversion.tigris.org wrote:
>
>
>>http://subversion.tigris.org/issues/show_bug.cgi?id=826
>>+
>>+
>>+ There were two problems. The obvious bug was that apr_off_t variables
>>+ were being printed using APR_SIZE_T_FMT. The less obvious bug was that
>>+ proplen was using apr_off_t when the prop string is stored in memory
>>+ (unnecessary), and also content_length was only apr_size_t when it needs to
>>+ hold both textlen and proplen. As textlen is (correctly) apr_off_t,
>>+ content_length needs to be apr_off_t too.
>>
>>
>
>To prevent this from happening again, we should probably add (I think this
>is the correct syntax):
>
>Index: subversion/include/svn_io.h
>===================================================================
>--- subversion/include/svn_io.h
>+++ subversion/include/svn_io.h Sun Jul 28 23:17:19 2002
>@@ -350,7 +350,9 @@
> svn_error_t *svn_stream_printf (svn_stream_t *stream,
> apr_pool_t *pool,
> const char *fmt,
>- ...);
>+ ...)
>+ __attribute__ ((format (printf, 3, 4)));
>+
>
> /* Allocate *STRINGBUF in POOL, and read one line from STREAM into it.
> The '\n' is read from the stream, but is not added to the end of
>
>
+10, but check how it's done in APR so that this doesn't frighten MSVC.
--
Brane Čibej <br...@xbc.nu> http://www.xbc.nu/brane/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org