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

ra_dav and svn_recurse_kind

From: Philip Martin <philip_at_codematters.co.uk>
Date: 2005-04-28 22:45:55 CEST

When I build ra_dav I see

../svn/subversion/libsvn_ra_dav/merge.c: In function 'okay_to_bump_path':
../svn/subversion/libsvn_ra_dav/merge.c:151: warning: cast from function call of type 'void *' to non-matching type 'enum svn_recurse_kind'

On investigation it looks a bit odd, the code in question is

149: r = (enum svn_recurse_kind) apr_hash_get (valid_targets,
150: parent_path->data,
151: APR_HASH_KEY_STRING);
152: if (r == svn_recursive)
153: return TRUE;

The cast is a bit odd, and there is more that is odd where the hash
appears to get set in commit.c:add_valid_target()

static void
add_valid_target (commit_ctx_t *cc,
                  const char *path,
                  enum svn_recurse_kind kind)
{
  apr_hash_t *hash = cc->valid_targets;
  svn_string_t *path_str = svn_string_create(path, apr_hash_pool_get(hash));
  apr_hash_set (hash, path_str->data, path_str->len, &kind);
}

It looks like it's storing a stack address in the hash, I don't think
that makes sense.

-- 
Philip Martin
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Thu Apr 28 23:37:45 2005

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.