Skip to content

Commit

Permalink
Remove extraneous semicolon from proxygen/lib/http/HTTPHeaders.h
Browse files Browse the repository at this point in the history
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: D51631140

fbshipit-source-id: 3ae9c699ea6eca3e110e9ddd23843c0fd922fcb7
  • Loading branch information
r-barnes authored and facebook-github-bot committed Nov 30, 2023
1 parent 27f849b commit 5c4be32
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion proxygen/lib/http/HTTPHeaders.h
Original file line number Diff line number Diff line change
Expand Up @@ -453,7 +453,8 @@ void HTTPHeaders::add(HTTPHeaderCode code, T&& value) {
const size_t pos = ptr - codes(); \
{Block} ptr++; \
} \
}
} \
static_assert(true, "semicolon required")

// iterate over the positions of all headers with given name
#define ITERATE_OVER_STRINGS(String, Block) \
Expand Down

0 comments on commit 5c4be32

Please sign in to comment.