Skip to content

Commit

Permalink
Remove extraneous semicolon from folly/synchronization/HazptrHolder.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: Orvid

Differential Revision: D51631113

fbshipit-source-id: cb26e946c075a9b45d11a6c1d47a6b523188c407
  • Loading branch information
r-barnes authored and facebook-github-bot committed Nov 30, 2023
1 parent c9a86e8 commit 7e330ad
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion folly/synchronization/HazptrHolder.h
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ class hazptr_holder {
FOLLY_ALWAYS_INLINE T* protect(const Atom<T*>& src, Func f) noexcept {
T* ptr = src.load(std::memory_order_relaxed);
while (!try_protect(ptr, src, f)) {
/* Keep trying */;
/* Keep trying */
}
return ptr;
}
Expand Down

0 comments on commit 7e330ad

Please sign in to comment.