Skip to content

Commit

Permalink
Remove extraneous semicolon from proxygen/lib/http/session/HTTPTransa…
Browse files Browse the repository at this point in the history
…ction.cpp

Summary:
Extraneous semicolons are a code smell and can mask more serious problems. `-Wextra-semi-stmt` finds them.

This diff removes an extraneous semicolon or adjusts a macro so that a semicolon is required after the macro (making it look like a standard function).

This file is drawn from a heavy-hitting list, so fixing this problem will allow *many* other files to take advantage of the safety `-Wextra-semi-stmt` offers.

This should be a low-risk diff: if it compiles, it works.

Reviewed By: meyering

Differential Revision: D51631142

fbshipit-source-id: b76a26b190524b3e182d5a2cc8b38ed2b5469e37
  • Loading branch information
r-barnes authored and facebook-github-bot committed Nov 30, 2023
1 parent 2123410 commit 27f849b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion proxygen/lib/http/session/HTTPTransaction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@ HTTPException stateMachineError(HTTPException::Direction dir, std::string msg) {
invariantViolation( \
HTTPException(HTTPException::Direction::INGRESS_AND_EGRESS, #X)); \
return Y; \
}
} \
static_assert(true, "semicolon required")

#define INVARIANT(X) \
if (!(X)) { \
Expand Down

0 comments on commit 27f849b

Please sign in to comment.