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

Re: Strange use of static local vars

From: Branko Čibej <brane_at_apache.org>
Date: Sun, 29 Jan 2017 17:21:31 +0100

On 29.01.2017 17:01, Branko Čibej wrote:
> In subversion/tests/libsvn_client/conflict-tests.c:
>
> static svn_error_t *
> create_wc_with_file_add_vs_file_add_merge_conflict(svn_test__sandbox_t *b,
> svn_boolean_t do_switch)
> {
> static const char *new_file_path;
> svn_client_ctx_t *ctx;
> static const char *trunk_url;
> svn_opt_revision_t opt_rev;
> svn_client_status_t *status;
> struct status_baton sb;
> svn_client_conflict_t *conflict;
> svn_boolean_t tree_conflicted;
> ...
>
>
> Why are new_file_path and trunk_url declared static?

I see this in a number of places in this file, and then in

create_wc_with_file_add_vs_file_add_update_conflict()

trunk_url is set but never used. Unfinished bits?

-- Brane
Received on 2017-01-29 17:21:41 CET

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