Skip to content

Commit

Permalink
pw_assert_tokenized: Rename token variable to avoid shadowing
Browse files Browse the repository at this point in the history
Change-Id: I240922b6de62a85d8d3a6d7fa39f773837143efc
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/244792
Commit-Queue: Auto-Submit <[email protected]>
Reviewed-by: Wyatt Hepler <[email protected]>
Pigweed-Auto-Submit: Ben Lawson <[email protected]>
Lint: Lint 🤖 <[email protected]>
Docs-Not-Needed: Ben Lawson <[email protected]>
  • Loading branch information
BenjaminLawson authored and CQ Bot Account committed Oct 28, 2024
1 parent c1c5bda commit b01f05a
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions pw_assert_tokenized/public/pw_assert_tokenized/check_tokenized.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,12 @@
#include "pw_log_tokenized/config.h"
#include "pw_tokenizer/tokenize.h"

#define _PW_ASSERT_TOKENIZED_TO_HANDLER(str) \
do { \
const uint32_t token = PW_TOKENIZE_STRING( \
PW_LOG_TOKENIZED_FORMAT_STRING("Check failure: " str)); \
pw_assert_tokenized_HandleCheckFailure(token, __LINE__); \
#define _PW_ASSERT_TOKENIZED_TO_HANDLER(str) \
do { \
const uint32_t _pw_assert_tokenized_to_handler_token = PW_TOKENIZE_STRING( \
PW_LOG_TOKENIZED_FORMAT_STRING("Check failure: " str)); \
pw_assert_tokenized_HandleCheckFailure( \
_pw_assert_tokenized_to_handler_token, __LINE__); \
} while (0)

#define PW_HANDLE_CRASH(...) _PW_ASSERT_TOKENIZED_TO_HANDLER(#__VA_ARGS__)
Expand Down

0 comments on commit b01f05a

Please sign in to comment.