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

Re: svn commit: rev 4721 - in trunk/subversion: clients/cmdline svnversion

From: Philip Martin <philip_at_codematters.co.uk>
Date: 2003-02-04 20:38:58 CET

rooneg@tigris.org writes:

> Author: rooneg
> Date: 2003-02-03 19:25:46 -0600 (Mon, 03 Feb 2003)
> New Revision: 4721
>
> Modified:
> trunk/subversion/clients/cmdline/main.c
> trunk/subversion/svnversion/main.c
> Log:
> * subversion/clients/cmdline/main.c
> (main): replace memset of opt_state and ctx with initialization to 0 at
> declaration time.
>
> * subversion/svnversion/main.c
> (main): replace memset of ctx with initialization to 0 at declaration time.
>
>
> Modified: trunk/subversion/clients/cmdline/main.c
> ==============================================================================
> --- trunk/subversion/clients/cmdline/main.c (original)
> +++ trunk/subversion/clients/cmdline/main.c Mon Feb 3 19:25:51 2003
> @@ -511,8 +511,8 @@
> apr_pool_t *pool;
> int opt_id, err2;
> apr_getopt_t *os;
> - svn_cl__opt_state_t opt_state;
> - svn_client_ctx_t ctx;
> + svn_cl__opt_state_t opt_state = { 0 };

The first member of svn_cl__opt_state_t is a structure, so 0 is not a
valid initialiser

../svn/subversion/clients/cmdline/main.c: In function `main':
../svn/subversion/clients/cmdline/main.c:514: warning: missing braces around initializer
../svn/subversion/clients/cmdline/main.c:514: warning: (near initialization for `opt_state.start_revision')

I suggest either

  svn_cl__opt_state_t opt_state = { };

or

  svn_cl__opt_state_t opt_state = { { 0 } };

-- 
Philip Martin
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue Feb 4 20:39:46 2003

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.