From 27f849b78ffd165e5515ec2e75aad18d75a6bd58 Mon Sep 17 00:00:00 2001 From: Richard Barnes Date: Wed, 29 Nov 2023 17:36:20 -0800 Subject: [PATCH] Remove extraneous semicolon from proxygen/lib/http/session/HTTPTransaction.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 --- proxygen/lib/http/session/HTTPTransaction.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/proxygen/lib/http/session/HTTPTransaction.cpp b/proxygen/lib/http/session/HTTPTransaction.cpp index fdc7a29844..5a82f7919d 100644 --- a/proxygen/lib/http/session/HTTPTransaction.cpp +++ b/proxygen/lib/http/session/HTTPTransaction.cpp @@ -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)) { \