Skip to content

Commit

Permalink
avoids clang -Wparentheses warning: using the result of an assignment…
Browse files Browse the repository at this point in the history
… as a condition, resolves NVIDIA#219
  • Loading branch information
andrewcorrigan committed Oct 19, 2020
1 parent 52d58a8 commit 7e822c4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cub/util_device.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,8 @@ public:

// We don't use `CubDebug` here because we let the user code
// decide whether or not errors are hard errors.
if (payload.error = std::forward<Invocable>(f)(payload.attribute))
payload.error = std::forward<Invocable>(f)(payload.attribute);
if (payload.error)
// Clear the global CUDA error state which may have been
// set by the last call. Otherwise, errors may "leak" to
// unrelated kernel launches.
Expand Down

0 comments on commit 7e822c4

Please sign in to comment.