D.J. Heap wrote:
> + /* Loop through the lock commands. */
> + for (i = 0; i < locks->nelts; ++i)
> + {
> + svn_pool_clear(subpool);
> + struct lock_cmd *cmd = apr_pcalloc(pool, sizeof(struct lock_cmd));
> +
> + svn_ra_svn_item_t *item = &APR_ARRAY_IDX(locks, i,
> svn_ra_svn_item_t);
> +
> + if (item->kind != SVN_RA_SVN_LIST)
> + return svn_error_create(SVN_ERR_RA_SVN_MALFORMED_DATA, NULL,
> + "Lock commands should be list of
> lists\n");
>
>
> There are a number of places in this commit that clear subpools before
> declaring and initializing scope variables like the above snippet.
>
> Obviously it works on some compilers, but MSVC doesn't like it (and
> refuses to compile)...and I thought it was illegal in C?
It is illegal in c89, but gcc allows it, so it often slips through the
cracks.
-garrett
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Thu Jul 7 22:44:03 2005