-
-
Notifications
You must be signed in to change notification settings - Fork 466
Introduce Cast to void for Condition of Assert #1191
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 6 commits
5c91f8b
54ba9a8
c2e7e8a
18caa15
f9cf20d
a0ac3b8
66a01db
ffc36dd
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"name": "Embedded Template Library ETL", | ||
"version": "20.43.2", | ||
"version": "20.43.4", | ||
"authors": { | ||
"name": "John Wellbelove", | ||
"email": "[email protected]" | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
name=Embedded Template Library ETL | ||
version=20.43.2 | ||
version=20.43.4 | ||
author= John Wellbelove <[email protected]> | ||
maintainer=John Wellbelove <[email protected]> | ||
license=MIT | ||
|
Original file line number | Diff line number | Diff line change | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -301,13 +301,13 @@ namespace etl | |||||||||||||||||
///\ingroup error_handler | ||||||||||||||||||
//*************************************************************************** | ||||||||||||||||||
#if defined(ETL_NO_CHECKS) | ||||||||||||||||||
#define ETL_ASSERT(b, e) ETL_DO_NOTHING // Does nothing. | ||||||||||||||||||
#define ETL_ASSERT_OR_RETURN(b, e) ETL_DO_NOTHING // Does nothing. | ||||||||||||||||||
#define ETL_ASSERT_OR_RETURN_VALUE(b, e, v) ETL_DO_NOTHING // Does nothing. | ||||||||||||||||||
#define ETL_ASSERT(b, e) static_cast<void>(b) // Does nothing. | ||||||||||||||||||
#define ETL_ASSERT_OR_RETURN(b, e) static_cast<void>(b) // Does nothing. | ||||||||||||||||||
#define ETL_ASSERT_OR_RETURN_VALUE(b, e, v) static_cast<void>(b) // Does nothing. | ||||||||||||||||||
|
||||||||||||||||||
#define ETL_ASSERT_FAIL(e) ETL_DO_NOTHING // Does nothing. | ||||||||||||||||||
#define ETL_ASSERT_FAIL_AND_RETURN(e) ETL_DO_NOTHING // Does nothing. | ||||||||||||||||||
#define ETL_ASSERT_FAIL_AND_RETURN_VALUE(e, v) ETL_DO_NOTHING // Does nothing. | ||||||||||||||||||
#define ETL_ASSERT_FAIL(e) static_cast<void>(b) // Does nothing. | ||||||||||||||||||
#define ETL_ASSERT_FAIL_AND_RETURN(e) static_cast<void>(b) // Does nothing. | ||||||||||||||||||
#define ETL_ASSERT_FAIL_AND_RETURN_VALUE(e, v) static_cast<void>(b) // Does nothing. | ||||||||||||||||||
#elif defined(ETL_USE_ASSERT_FUNCTION) | ||||||||||||||||||
|
#define ETL_ASSERT_FAIL(e) static_cast<void>(b) // Does nothing. | |
#define ETL_ASSERT_FAIL_AND_RETURN(e) static_cast<void>(b) // Does nothing. | |
#define ETL_ASSERT_FAIL_AND_RETURN_VALUE(e, v) static_cast<void>(b) // Does nothing. | |
#elif defined(ETL_USE_ASSERT_FUNCTION) | |
#define ETL_ASSERT_FAIL(e) // Does nothing. | |
#define ETL_ASSERT_FAIL_AND_RETURN(e) {return;} // Returns. | |
#define ETL_ASSERT_FAIL_AND_RETURN_VALUE(e, v) {return (v);} // Returns a value. | |
#elif defined(ETL_USE_ASSERT_FUNCTION) |
🤖 Prompt for AI Agents
In include/etl/error_handler.h around lines 308 to 311, the ETL_ASSERT_FAIL
macros incorrectly reference an undefined identifier 'b' (static_cast<void>(b))
which causes a compile error; update each macro so it is a true no‑op that does
not evaluate 'e' (match the release branch behavior) by replacing the
static_cast(void)(b) with a safe no‑op such as static_cast<void>(0) (or (void)0)
for ETL_ASSERT_FAIL, ETL_ASSERT_FAIL_AND_RETURN and
ETL_ASSERT_FAIL_AND_RETURN_VALUE.
coderabbitai[bot] marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"name": "Embedded Template Library", | ||
"version": "20.43.2", | ||
"version": "20.43.4", | ||
"authors": { | ||
"name": "John Wellbelove", | ||
"email": "[email protected]" | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
name=Embedded Template Library | ||
version=20.43.2 | ||
version=20.43.4 | ||
author= John Wellbelove <[email protected]> | ||
maintainer=John Wellbelove <[email protected]> | ||
license=MIT | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
20.43.2 | ||
20.43.4 |
Uh oh!
There was an error while loading. Please reload this page.