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

Bug34078 035 #1882

Open
wants to merge 7 commits into
base: maint-0.3.5
Choose a base branch
from
Open

Conversation

nmathewson
Copy link
Contributor

No description provided.

@coveralls
Copy link

coveralls commented May 6, 2020

Pull Request Test Coverage Report for Build 8851

  • 10 of 12 (83.33%) changed or added relevant lines in 6 files are covered.
  • 13 unchanged lines in 2 files lost coverage.
  • Overall coverage decreased (-0.02%) to 60.909%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/core/or/reasons.c 0 1 0.0%
src/feature/control/control.c 0 1 0.0%
Files with Coverage Reduction New Missed Lines %
src/feature/dirauth/shared_random.c 4 85.1%
src/feature/dirauth/dirvote.c 9 64.65%
Totals Coverage Status
Change from base Build 8686: -0.02%
Covered Lines: 44586
Relevant Lines: 73201

💛 - Coveralls

This macro defers to __attribute__((fallthrough)) on GCC (and
clang).  Previously we had been using GCC's magic /* fallthrough */
comments, but clang very sensibly doesn't accept those.

Since not all compiler recognize it, we only define it when our
configure script detects that it works.

Part of a fix for 34078.
GCC added an implicit-fallthrough warning a while back, where it
would complain if you had a nontrivial "case:" block that didn't end
with break, return, or something like that.  Clang recently added
the same thing.

GCC, however, would let you annotate a fall-through as intended by
any of various magic "/* fall through */" comments.  Clang, however,
only seems to like "__attribute__((fallthrough))".  Fortunately, GCC
accepts that too.

A previous commit in this branch defined a FALLTHROUGH macro to do
the right thing if GNUC is defined; here we replace all of our "fall
through" comments with uses of that macro.

This is an automated commit, made with the following perl one-liner:

  #!/usr/bin/perl -i -p
  s#/\* *falls? ?thr.*?\*/#FALLTHROUGH;#i;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants