Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug30184 034 #958

Merged
merged 4 commits into from Aug 9, 2019
Merged

Bug30184 034 #958

merged 4 commits into from Aug 9, 2019

Conversation

Labels
None yet
Projects
None yet
4 participants
@teor2345
Copy link
Contributor

@teor2345 teor2345 commented Apr 17, 2019

No description provided.

nmathewson and others added 4 commits Apr 16, 2019
In 0.3.4 and later, we declare write_array as:
extern struct bw_array_t *write_array;
...
typedef struct bw_array_t bw_array_t;

But in 0.2.9, we declare write_array as:
typedef struct bw_array_t bw_array_t;
extern bw_array_t *write_array;

And then again in rephist.c:
typedef struct bw_array_t bw_array_t;

So some compilers fail with a duplicate declaration error.

We backport 684b396, which removes the duplicate declaration.
And this commit deals with the undeclared type error.

Backports a single line from merge commit 813019c.

Fixes bug 30184; not in any released version of Tor.
In 0.3.4 and later, these functions are declared in rephist.h:
STATIC uint64_t find_largest_max(bw_array_t *b);
STATIC void commit_max(bw_array_t *b);
STATIC void advance_obs(bw_array_t *b);

But in 0.2.9, they are declared in rephist.c and test_relay.c.

So compilers fail with a "must use 'struct' tag" error.

We add the missing struct typedef in test_relay.c, to match the
declarations in rephist.c.

(Merge commit 813019c moves these functions into rephist.h instead.)

Fixes bug 30184; not in any released version of Tor.
"ours" merge, because 0.3.4 has a different set of changes,
which already compile.
@coveralls
Copy link

@coveralls coveralls commented Apr 17, 2019

Pull Request Test Coverage Report for Build 4755

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 3 unchanged lines in 1 file lost coverage.
  • Overall coverage increased (+0.01%) to 62.276%

Files with Coverage Reduction New Missed Lines %
src/core/or/circuitpadding.c 3 92.07%
Totals Coverage Status
Change from base Build 4746: 0.01%
Covered Lines: 46198
Relevant Lines: 74183

💛 - Coveralls

@torproject-pusher torproject-pusher merged commit dfdd877 into torproject:master Aug 9, 2019
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment