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

Pre formatter cleanups #1610

Closed
wants to merge 23 commits into from

Conversation

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

@nmathewson nmathewson commented Dec 16, 2019

No description provided.

nmathewson added 22 commits Dec 16, 2019
This is an automated commit, generated by:

perl -i -pe 'next if /define/; s/((?:ENABLE|DISABLE)_GCC_WARNING)\(([A-Za-z0-9_\-]+)\)/$1(\"-W$2\")/' src/*/*/*.[ch] src/*/*.[ch]
We were actually omitting the semicolon in a few places, leading to
confusing indentation and some cocci failures.
Also, include torerr.h from ht.h if we are using raw_assert.

Otherwise, our includes need to be ordered so that ht.h comes after
util_log.h.
Otherwise our compilation depends on include order.
This gives us the definition of tor_x509_cert_impl_t, and makes us
less dependent on include order.
This frees us from some dependencies on include order.
This frees us from a dependency on include order.
Doing this gives us a valid uint64_t type, freeing us from
dependencies on include order.
Using these frees us from several dependencies on include order.
Doing this frees us from some assumptions about include order.
This frees us from some dependencies on include order.
This frees us from some dependencies on include order.
This lets us avoid a dependency on include order.
Without this include, our compilation depends more on include order.
This fixes a case where our compilation would depend on include order.
This prevents a dependency on include order.
Without this change, compilation success depends on include order in
several tricky ways.
This change means that authmode.h no longer needs to see
or_options_t, and frees us from an ordering dependency.
This frees us from a dependency on include order.
We use bool, so we should include stdbool.
@coveralls
Copy link

@coveralls coveralls commented Dec 16, 2019

Pull Request Test Coverage Report for Build 7581

  • 3 of 4 (75.0%) changed or added relevant lines in 2 files are covered.
  • 5 unchanged lines in 3 files lost coverage.
  • Overall coverage increased (+0.02%) to 63.022%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/core/mainloop/connection.h 1 2 50.0%
Files with Coverage Reduction New Missed Lines %
src/core/or/channeltls.c 1 42.54%
src/feature/hs/hs_circuit.c 2 41.57%
src/feature/nodelist/nodelist.c 2 71.66%
Totals Coverage Status
Change from base Build 7551: 0.02%
Covered Lines: 49562
Relevant Lines: 78643

💛 - Coveralls

# define ENABLE_GCC_WARNING(warningopt) \
PRAGMA_DIAGNOSTIC_(pop)
#else /* !(defined(__clang__) || GCC_VERSION >= 406) */
/* older version of gcc: no push/pop support. */
# define DISABLE_GCC_WARNING(warningopt) \
PRAGMA_DIAGNOSTIC_(ignored PRAGMA_JOIN_STRINGIFY_(-W,warningopt))
PRAGMA_DIAGNOSTIC_(ignored PRAGMA_JOIN_STRINGIFY_ warningopt)
Copy link
Contributor

@tlyu tlyu Dec 16, 2019

Should probably completely delete PRAGMA_JOIN_STRINGIFY_ as was done on L73. Same on L81.

Preprocessor substitution of empty token for undefined macros probably makes this compile, but we probably shouldn't leave it lying around.

…nfuse clang-format less

Remove remaining uses of PRAGMA_JOIN_STRINGIFY_: these should have
gone away entirely.  Caught by Taylor.
@torproject-pusher torproject-pusher deleted the branch torproject:master May 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment