[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: Philip Martin <philip_at_codematters.co.uk>
Date: 2002-11-20 01:22:49 CET

Karl Fogel <kfogel@newton.ch.collab.net> writes:

> > /* 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'.

We could avoid the apr_pstrdup all together if it was delayed until
the first character needing replacement was found.

-- 
Philip Martin
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed Nov 20 01:24:07 2002

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.