Author: julianfoad
Date: Thu Jun 2 12:34:28 2011
New Revision: 1130523
URL: http://svn.apache.org/viewvc?rev=1130523&view=rev
Log:
* subversion/svnrdump/load_editor.c
(set_node_property): Don't modify a 'const' input parameter. Instead,
create a modified copy of it.
Found by GCC's warning about discarding the 'const' qualifier.
Modified:
subversion/trunk/subversion/svnrdump/load_editor.c
Modified: subversion/trunk/subversion/svnrdump/load_editor.c
URL:
http://svn.apache.org/viewvc/subversion/trunk/subversion/svnrdump/load_editor.c?rev=1130523&r1=1130522&r2=1130523&view=diff
==============================================================================
--- subversion/trunk/subversion/svnrdump/load_editor.c (original)
+++ subversion/trunk/subversion/svnrdump/load_editor.c Thu Jun 2 12:34:28 2011
@@ -767,32 +767,33 @@ set_node_property(void *baton,
if (value && strcmp(name, SVN_PROP_MERGEINFO) == 0)
{
svn_string_t *renumbered_mergeinfo;
- svn_string_t *prop_val = (svn_string_t *)value;
+ svn_string_t prop_val;
/* Tolerate mergeinfo with "\r\n" line endings because some
dumpstream sources might contain as much. If so normalize
the line endings to '\n' and make a notification to
PARSE_BATON->FEEDBACK_STREAM that we have made this
correction. */
- if (strstr(prop_val->data, "\r"))
+ if (strstr(value->data, "\r"))
{
const char *prop_eol_normalized;
- SVN_ERR(svn_subst_translate_cstring2(prop_val->data,
+ SVN_ERR(svn_subst_translate_cstring2(value->data,
&prop_eol_normalized,
"\n", /* translate to LF */
FALSE, /* no repair */
NULL, /* no keywords */
FALSE, /* no expansion */
pool));
- prop_val->data = prop_eol_normalized;
- prop_val->len = strlen(prop_eol_normalized);
+ prop_val.data = prop_eol_normalized;
+ prop_val.len = strlen(prop_eol_normalized);
+ value = &prop_val;
/* ### TODO: notify? */
}
/* Renumber mergeinfo as appropriate. */
- SVN_ERR(renumber_mergeinfo_revs(&renumbered_mergeinfo, prop_val,
+ SVN_ERR(renumber_mergeinfo_revs(&renumbered_mergeinfo, value,
nb->rb, pool));
value = renumbered_mergeinfo;