[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 3830 - trunk/subversion/libsvn_subr

From: Karl Fogel <kfogel_at_newton.ch.collab.net>
Date: 2002-11-19 22:46:11 CET

brane@tigris.org writes:
> New Revision: 3830
>
> Modified: trunk/subversion/libsvn_subr/path.c
> ==============================================================================
> --- trunk/subversion/libsvn_subr/path.c (original)
> +++ trunk/subversion/libsvn_subr/path.c Tue Nov 19 13:31:12 2002
> @@ -51,10 +51,10 @@
> char *p;
>
> /* Convert all local-style separators to the canonical ones. */
> - for (p = apr_pstrdup (pool, path); *p != '\0'; ++p)
> + path = apr_pstrdup (pool, path);
> + for (p = path; *p != '\0'; ++p)
> if (*p == SVN_PATH_LOCAL_SEPARATOR)
> *p = '/';
> - path = p;
> }

`path' is still a `const char *', so when you assign "p = path", it
generates a warning under GCC 2.96:

   "assignment discards qualifiers from pointer target type"

...despite the fact that you apr_pstrdup'd `path'.

> @@ -73,10 +73,10 @@
> char *p;
>
> /* Convert all canonical separators to the local-style ones. */
> - for (p = apr_pstrdup (pool, path); *p != '\0'; ++p)
> + path = apr_pstrdup (pool, path);
> + for (p = path; *p != '\0'; ++p)
> if (*p == '/')
> *p = SVN_PATH_LOCAL_SEPARATOR;
> - path = p;
> }

Same here.

-Karl

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue Nov 19 23:21:30 2002

This is an archived mail posted to the Subversion Dev mailing list.