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

Re: svn commit: r31622 - trunk/subversion/libsvn_repos

From: Senthil Kumaran S <senthil_at_collab.net>
Date: Tue, 10 Jun 2008 13:04:46 +0530

Hi Daniel,

danielsh_at_tigris.org wrote:
> + if (capabilities)
> + {
> + capabilities_string = svn_cstring_join(capabilities, ":", pool);
> +
> + /* Get rid of that annoying final colon. */
> + if (capabilities_string[0])
> + capabilities_string[strlen(capabilities_string) - 1] = '\0';
> + }
> + else
> + {
> + capabilities_string = "";
> + }

We cannot assign a string constant directly like that. A good compiler will
give the following.

<snip>
../subversion/libsvn_repos/hooks.c: In function 'svn_repos__hooks_start_commit':
../subversion/libsvn_repos/hooks.c:579: warning: assignment discards qualifiers
from pointer target type
</snip>

My compiler version is:
gcc (GCC) 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

The attached patch fixes this :)

[[[
Fix a compiler warning.

* subversion/libsvn_repos/hooks.c
   (svn_repos__hooks_start_commit): Fix a compiler warning of 'assignment
    discards qualifiers from pointer target type'.

Patch by: stylesen
]]]

Thank You.

-- 
Senthil Kumaran S
http://www.stylesen.org/


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: dev-help_at_subversion.tigris.org

Received on 2008-06-10 09:35:21 CEST

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.