Skip to content
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

Fix pedantic warning on assert macro #2436

Merged
merged 3 commits into from
Dec 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
190 changes: 51 additions & 139 deletions Fw/Types/Assert.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -165,188 +165,100 @@
s_assertHook = this->previousHook;
}

NATIVE_INT_TYPE SwAssert(FILE_NAME_ARG file, NATIVE_UINT_TYPE lineNo) {
// Default handler of SwAssert functions
NATIVE_INT_TYPE defaultSwAssert(

Check notice

Code scanning / CodeQL

Use of basic integral type Note

defaultSwAssert uses the basic integral type int rather than a typedef with size and signedness.

Check notice

Code scanning / CodeQL

Function too long Note

defaultSwAssert has too many parameters (9, while 6 are allowed).
FILE_NAME_ARG file,

Check notice

Code scanning / CodeQL

Use of basic integral type Note

file uses the basic integral type char rather than a typedef with size and signedness.
NATIVE_UINT_TYPE lineNo,

Check notice

Code scanning / CodeQL

Use of basic integral type Note

lineNo uses the basic integral type unsigned int rather than a typedef with size and signedness.
NATIVE_UINT_TYPE numArgs,

Check notice

Code scanning / CodeQL

Use of basic integral type Note

numArgs uses the basic integral type unsigned int rather than a typedef with size and signedness.
FwAssertArgType arg1,

Check notice

Code scanning / CodeQL

Use of basic integral type Note

arg1 uses the basic integral type int rather than a typedef with size and signedness.
FwAssertArgType arg2,

Check notice

Code scanning / CodeQL

Use of basic integral type Note

arg2 uses the basic integral type int rather than a typedef with size and signedness.
FwAssertArgType arg3,

Check notice

Code scanning / CodeQL

Use of basic integral type Note

arg3 uses the basic integral type int rather than a typedef with size and signedness.
FwAssertArgType arg4,

Check notice

Code scanning / CodeQL

Use of basic integral type Note

arg4 uses the basic integral type int rather than a typedef with size and signedness.
FwAssertArgType arg5,

Check notice

Code scanning / CodeQL

Use of basic integral type Note

arg5 uses the basic integral type int rather than a typedef with size and signedness.
FwAssertArgType arg6) {

Check notice

Code scanning / CodeQL

Use of basic integral type Note

arg6 uses the basic integral type int rather than a typedef with size and signedness.
if (nullptr == s_assertHook) {
CHAR assertMsg[FW_ASSERT_DFL_MSG_LEN];
defaultReportAssert(
file,
lineNo,
0,
0,0,0,0,0,0,
numArgs,

Check warning

Code scanning / CodeQL

Unchecked function argument Warning

This use of parameter numArgs has not been checked.
arg1,arg2,arg3,arg4,arg5,arg6,

Check warning

Code scanning / CodeQL

Unchecked function argument Warning

This use of parameter arg1 has not been checked.

Check warning

Code scanning / CodeQL

Unchecked function argument Warning

This use of parameter arg2 has not been checked.

Check warning

Code scanning / CodeQL

Unchecked function argument Warning

This use of parameter arg3 has not been checked.

Check warning

Code scanning / CodeQL

Unchecked function argument Warning

This use of parameter arg4 has not been checked.

Check warning

Code scanning / CodeQL

Unchecked function argument Warning

This use of parameter arg5 has not been checked.

Check warning

Code scanning / CodeQL

Unchecked function argument Warning

This use of parameter arg6 has not been checked.
assertMsg,sizeof(assertMsg));
// print message
defaultPrintAssert(assertMsg);
assert(0);
}
else {
s_assertHook->reportAssert(
file,
lineNo,
0,
0,0,0,0,0,0);
numArgs,

Check warning

Code scanning / CodeQL

Unchecked function argument Warning

This use of parameter numArgs has not been checked.
arg1,arg2,arg3,arg4,arg5,arg6);

Check warning

Code scanning / CodeQL

Unchecked function argument Warning

This use of parameter arg1 has not been checked.

Check warning

Code scanning / CodeQL

Unchecked function argument Warning

This use of parameter arg2 has not been checked.

Check warning

Code scanning / CodeQL

Unchecked function argument Warning

This use of parameter arg3 has not been checked.

Check warning

Code scanning / CodeQL

Unchecked function argument Warning

This use of parameter arg4 has not been checked.

Check warning

Code scanning / CodeQL

Unchecked function argument Warning

This use of parameter arg5 has not been checked.

Check warning

Code scanning / CodeQL

Unchecked function argument Warning

This use of parameter arg6 has not been checked.
s_assertHook->doAssert();
}
return 0;
}

NATIVE_INT_TYPE SwAssert(FILE_NAME_ARG file, NATIVE_UINT_TYPE lineNo,
FwAssertArgType arg1) {
if (nullptr == s_assertHook) {
CHAR assertMsg[FW_ASSERT_DFL_MSG_LEN];
defaultReportAssert(
file,
lineNo,
1,
arg1,0,0,0,0,0,
assertMsg,sizeof(assertMsg));
// print message
defaultPrintAssert(assertMsg);
assert(0);
}
else {
s_assertHook->reportAssert(
file,
lineNo,
1,
arg1,0,0,0,0,0);
s_assertHook->doAssert();
}
return 0;
NATIVE_INT_TYPE SwAssert(

Check notice

Code scanning / CodeQL

Use of basic integral type Note

SwAssert uses the basic integral type int rather than a typedef with size and signedness.
FILE_NAME_ARG file,

Check notice

Code scanning / CodeQL

Use of basic integral type Note

file uses the basic integral type char rather than a typedef with size and signedness.
NATIVE_UINT_TYPE lineNo) {

Check notice

Code scanning / CodeQL

Use of basic integral type Note

lineNo uses the basic integral type unsigned int rather than a typedef with size and signedness.
return defaultSwAssert(file, lineNo, 0, 0, 0, 0, 0, 0, 0);

Check warning

Code scanning / CodeQL

Unchecked function argument Warning

This use of parameter file has not been checked.

Check warning

Code scanning / CodeQL

Unchecked function argument Warning

This use of parameter lineNo has not been checked.
}

NATIVE_INT_TYPE SwAssert(FILE_NAME_ARG file, NATIVE_UINT_TYPE lineNo,
NATIVE_INT_TYPE SwAssert(

Check notice

Code scanning / CodeQL

Use of basic integral type Note

SwAssert uses the basic integral type int rather than a typedef with size and signedness.
FILE_NAME_ARG file,

Check notice

Code scanning / CodeQL

Use of basic integral type Note

file uses the basic integral type char rather than a typedef with size and signedness.
FwAssertArgType arg1,
FwAssertArgType arg2) {
if (nullptr == s_assertHook) {
CHAR assertMsg[FW_ASSERT_DFL_MSG_LEN];
defaultReportAssert(
file,
lineNo,
2,
arg1,arg2,0,0,0,0,
assertMsg,sizeof(assertMsg));
defaultPrintAssert(assertMsg);
assert(0);
}
else {
s_assertHook->reportAssert(
file,
lineNo,
2,
arg1,arg2,0,0,0,0);
s_assertHook->doAssert();
}
return 0;
NATIVE_UINT_TYPE lineNo) {

Check notice

Code scanning / CodeQL

Use of basic integral type Note

lineNo uses the basic integral type unsigned int rather than a typedef with size and signedness.
return defaultSwAssert(file, lineNo, 1, arg1, 0, 0, 0, 0, 0);

Check warning

Code scanning / CodeQL

Unchecked function argument Warning

This use of parameter file has not been checked.

Check warning

Code scanning / CodeQL

Unchecked function argument Warning

This use of parameter lineNo has not been checked.

Check warning

Code scanning / CodeQL

Unchecked function argument Warning

This use of parameter arg1 has not been checked.
}

NATIVE_INT_TYPE SwAssert(FILE_NAME_ARG file, NATIVE_UINT_TYPE lineNo,
NATIVE_INT_TYPE SwAssert(

Check notice

Code scanning / CodeQL

Use of basic integral type Note

SwAssert uses the basic integral type int rather than a typedef with size and signedness.
FILE_NAME_ARG file,

Check notice

Code scanning / CodeQL

Use of basic integral type Note

file uses the basic integral type char rather than a typedef with size and signedness.
FwAssertArgType arg1,
FwAssertArgType arg2,
FwAssertArgType arg3) {
if (nullptr == s_assertHook) {
CHAR assertMsg[FW_ASSERT_DFL_MSG_LEN];
defaultReportAssert(
file,
lineNo,
3,
arg1,arg2,arg3,0,0,0,
assertMsg,sizeof(assertMsg));
defaultPrintAssert(assertMsg);
assert(0);
}
else {
s_assertHook->reportAssert(
file,
lineNo,
3,
arg1,arg2,arg3,0,0,0);
s_assertHook->doAssert();
}
return 0;
NATIVE_UINT_TYPE lineNo) {

Check notice

Code scanning / CodeQL

Use of basic integral type Note

lineNo uses the basic integral type unsigned int rather than a typedef with size and signedness.
return defaultSwAssert(file, lineNo, 2, arg1, arg2, 0, 0, 0, 0);

Check warning

Code scanning / CodeQL

Unchecked function argument Warning

This use of parameter file has not been checked.

Check warning

Code scanning / CodeQL

Unchecked function argument Warning

This use of parameter lineNo has not been checked.

Check warning

Code scanning / CodeQL

Unchecked function argument Warning

This use of parameter arg1 has not been checked.

Check warning

Code scanning / CodeQL

Unchecked function argument Warning

This use of parameter arg2 has not been checked.
}

NATIVE_INT_TYPE SwAssert(FILE_NAME_ARG file, NATIVE_UINT_TYPE lineNo,
NATIVE_INT_TYPE SwAssert(

Check notice

Code scanning / CodeQL

Use of basic integral type Note

SwAssert uses the basic integral type int rather than a typedef with size and signedness.
FILE_NAME_ARG file,

Check notice

Code scanning / CodeQL

Use of basic integral type Note

file uses the basic integral type char rather than a typedef with size and signedness.
FwAssertArgType arg1,
FwAssertArgType arg2,
FwAssertArgType arg3,
FwAssertArgType arg4) {
if (nullptr == s_assertHook) {
CHAR assertMsg[FW_ASSERT_DFL_MSG_LEN];
defaultReportAssert(
file,
lineNo,
4,
arg1,arg2,arg3,arg4,0,0,
assertMsg,sizeof(assertMsg));
defaultPrintAssert(assertMsg);
assert(0);
}
else {
s_assertHook->reportAssert(
file,
lineNo,
4,
arg1,arg2,arg3,arg4,0,0);
s_assertHook->doAssert();
}
return 0;
NATIVE_UINT_TYPE lineNo) {

Check notice

Code scanning / CodeQL

Use of basic integral type Note

lineNo uses the basic integral type unsigned int rather than a typedef with size and signedness.
return defaultSwAssert(file, lineNo, 3, arg1, arg2, arg3, 0, 0, 0);

Check warning

Code scanning / CodeQL

Unchecked function argument Warning

This use of parameter file has not been checked.

Check warning

Code scanning / CodeQL

Unchecked function argument Warning

This use of parameter lineNo has not been checked.

Check warning

Code scanning / CodeQL

Unchecked function argument Warning

This use of parameter arg1 has not been checked.

Check warning

Code scanning / CodeQL

Unchecked function argument Warning

This use of parameter arg2 has not been checked.

Check warning

Code scanning / CodeQL

Unchecked function argument Warning

This use of parameter arg3 has not been checked.
}

NATIVE_INT_TYPE SwAssert(FILE_NAME_ARG file, NATIVE_UINT_TYPE lineNo,
NATIVE_INT_TYPE SwAssert(

Check notice

Code scanning / CodeQL

Use of basic integral type Note

SwAssert uses the basic integral type int rather than a typedef with size and signedness.
FILE_NAME_ARG file,

Check notice

Code scanning / CodeQL

Use of basic integral type Note

file uses the basic integral type char rather than a typedef with size and signedness.
FwAssertArgType arg1,
FwAssertArgType arg2,
FwAssertArgType arg3,
FwAssertArgType arg4,
FwAssertArgType arg5) {
if (nullptr == s_assertHook) {
CHAR assertMsg[FW_ASSERT_DFL_MSG_LEN];
defaultReportAssert(
file,
lineNo,
5,
arg1,arg2,arg3,arg4,arg5,0,
assertMsg,sizeof(assertMsg));
defaultPrintAssert(assertMsg);
assert(0);
}
else {
s_assertHook->reportAssert(
file,
lineNo,
5,
arg1,arg2,arg3,arg4,arg5,0);
s_assertHook->doAssert();
}
return 0;
NATIVE_UINT_TYPE lineNo) {

Check notice

Code scanning / CodeQL

Use of basic integral type Note

lineNo uses the basic integral type unsigned int rather than a typedef with size and signedness.
return defaultSwAssert(file, lineNo, 4, arg1, arg2, arg3, arg4, 0, 0);

Check warning

Code scanning / CodeQL

Unchecked function argument Warning

This use of parameter file has not been checked.

Check warning

Code scanning / CodeQL

Unchecked function argument Warning

This use of parameter lineNo has not been checked.

Check warning

Code scanning / CodeQL

Unchecked function argument Warning

This use of parameter arg1 has not been checked.

Check warning

Code scanning / CodeQL

Unchecked function argument Warning

This use of parameter arg2 has not been checked.

Check warning

Code scanning / CodeQL

Unchecked function argument Warning

This use of parameter arg3 has not been checked.

Check warning

Code scanning / CodeQL

Unchecked function argument Warning

This use of parameter arg4 has not been checked.
}

NATIVE_INT_TYPE SwAssert(FILE_NAME_ARG file, NATIVE_UINT_TYPE lineNo,
NATIVE_INT_TYPE SwAssert(

Check notice

Code scanning / CodeQL

Use of basic integral type Note

SwAssert uses the basic integral type int rather than a typedef with size and signedness.

Check notice

Code scanning / CodeQL

Function too long Note

SwAssert has too many parameters (7, while 6 are allowed).
FILE_NAME_ARG file,

Check notice

Code scanning / CodeQL

Use of basic integral type Note

file uses the basic integral type char rather than a typedef with size and signedness.
FwAssertArgType arg1,
FwAssertArgType arg2,
FwAssertArgType arg3,
FwAssertArgType arg4,
FwAssertArgType arg5,
FwAssertArgType arg6) {
if (nullptr == s_assertHook) {
CHAR assertMsg[FW_ASSERT_DFL_MSG_LEN];
defaultReportAssert(
file,
lineNo,
6,
arg1,arg2,arg3,arg4,arg5,arg6,
assertMsg,sizeof(assertMsg));
defaultPrintAssert(assertMsg);
assert(0);
}
else {
s_assertHook->reportAssert(
file,
lineNo,
6,
arg1,arg2,arg3,arg4,arg5,arg6);
s_assertHook->doAssert();
}
return 0;
NATIVE_UINT_TYPE lineNo) {

Check notice

Code scanning / CodeQL

Use of basic integral type Note

lineNo uses the basic integral type unsigned int rather than a typedef with size and signedness.
return defaultSwAssert(file, lineNo, 5, arg1, arg2, arg3, arg4, arg5, 0);

Check warning

Code scanning / CodeQL

Unchecked function argument Warning

This use of parameter file has not been checked.

Check warning

Code scanning / CodeQL

Unchecked function argument Warning

This use of parameter lineNo has not been checked.

Check warning

Code scanning / CodeQL

Unchecked function argument Warning

This use of parameter arg1 has not been checked.

Check warning

Code scanning / CodeQL

Unchecked function argument Warning

This use of parameter arg2 has not been checked.

Check warning

Code scanning / CodeQL

Unchecked function argument Warning

This use of parameter arg3 has not been checked.

Check warning

Code scanning / CodeQL

Unchecked function argument Warning

This use of parameter arg4 has not been checked.

Check warning

Code scanning / CodeQL

Unchecked function argument Warning

This use of parameter arg5 has not been checked.
}

NATIVE_INT_TYPE SwAssert(

Check notice

Code scanning / CodeQL

Use of basic integral type Note

SwAssert uses the basic integral type int rather than a typedef with size and signedness.

Check notice

Code scanning / CodeQL

Function too long Note

SwAssert has too many parameters (8, while 6 are allowed).

Check notice

Code scanning / CodeQL

Long function without assertion Note

All functions of more than 10 lines should have at least one assertion.
FILE_NAME_ARG file,

Check notice

Code scanning / CodeQL

Use of basic integral type Note

file uses the basic integral type char rather than a typedef with size and signedness.
FwAssertArgType arg1,

Check notice

Code scanning / CodeQL

Use of basic integral type Note

arg1 uses the basic integral type int rather than a typedef with size and signedness.
FwAssertArgType arg2,

Check notice

Code scanning / CodeQL

Use of basic integral type Note

arg2 uses the basic integral type int rather than a typedef with size and signedness.
FwAssertArgType arg3,

Check notice

Code scanning / CodeQL

Use of basic integral type Note

arg3 uses the basic integral type int rather than a typedef with size and signedness.
FwAssertArgType arg4,

Check notice

Code scanning / CodeQL

Use of basic integral type Note

arg4 uses the basic integral type int rather than a typedef with size and signedness.
FwAssertArgType arg5,

Check notice

Code scanning / CodeQL

Use of basic integral type Note

arg5 uses the basic integral type int rather than a typedef with size and signedness.
FwAssertArgType arg6,

Check notice

Code scanning / CodeQL

Use of basic integral type Note

arg6 uses the basic integral type int rather than a typedef with size and signedness.
NATIVE_UINT_TYPE lineNo) {

Check notice

Code scanning / CodeQL

Use of basic integral type Note

lineNo uses the basic integral type unsigned int rather than a typedef with size and signedness.
return defaultSwAssert(file, lineNo, 6, arg1, arg2, arg3, arg4, arg5, arg6);

Check warning

Code scanning / CodeQL

Unchecked function argument Warning

This use of parameter file has not been checked.

Check warning

Code scanning / CodeQL

Unchecked function argument Warning

This use of parameter lineNo has not been checked.

Check warning

Code scanning / CodeQL

Unchecked function argument Warning

This use of parameter arg1 has not been checked.

Check warning

Code scanning / CodeQL

Unchecked function argument Warning

This use of parameter arg2 has not been checked.

Check warning

Code scanning / CodeQL

Unchecked function argument Warning

This use of parameter arg3 has not been checked.

Check warning

Code scanning / CodeQL

Unchecked function argument Warning

This use of parameter arg4 has not been checked.

Check warning

Code scanning / CodeQL

Unchecked function argument Warning

This use of parameter arg5 has not been checked.

Check warning

Code scanning / CodeQL

Unchecked function argument Warning

This use of parameter arg6 has not been checked.
}
}

Expand Down
88 changes: 71 additions & 17 deletions Fw/Types/Assert.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,28 @@
#define FW_ASSERT(...)
#else // ASSERT is defined

// Return only the first argument passed to the macro.
#define FW_ASSERT_FIRST_ARG(ARG_0, ...) ARG_0

Check notice

Code scanning / CodeQL

Undisciplined macro Note

The macro FW_ASSERT_FIRST_ARG(ARG_0,__VA_ARGS__...) is variadic, and hence not allowed.
// Return all the arguments of the macro, but the first one
#define FW_ASSERT_NO_FIRST_ARG(ARG_0, ...) __VA_ARGS__

Check notice

Code scanning / CodeQL

Undisciplined macro Note

The macro FW_ASSERT_NO_FIRST_ARG(ARG_0,__VA_ARGS__...) is variadic, and hence not allowed.

// Passing the __LINE__ argument at the end of the function ensures that
// the FW_ASSERT_NO_FIRST_ARG macro will never have an empty variadic variable
#if FW_ASSERT_LEVEL == FW_FILEID_ASSERT
#define FILE_NAME_ARG U32
#define FW_ASSERT(cond, ...) \
((void) ((cond) ? (0) : \
(Fw::SwAssert(ASSERT_FILE_ID, __LINE__, ##__VA_ARGS__))))
#define FW_ASSERT(...) \
((void) ((FW_ASSERT_FIRST_ARG(__VA_ARGS__, 0)) ? (0) : \
(Fw::SwAssert(ASSERT_FILE_ID, FW_ASSERT_NO_FIRST_ARG(__VA_ARGS__, __LINE__)))))
#elif FW_ASSERT_LEVEL == FW_RELATIVE_PATH_ASSERT
#define FILE_NAME_ARG const CHAR*
#define FW_ASSERT(cond, ...) \
((void) ((cond) ? (0) : \
(Fw::SwAssert(ASSERT_RELATIVE_PATH, __LINE__, ##__VA_ARGS__))))
#define FW_ASSERT(...) \
((void) ((FW_ASSERT_FIRST_ARG(__VA_ARGS__, 0)) ? (0) : \
(Fw::SwAssert(ASSERT_RELATIVE_PATH, FW_ASSERT_NO_FIRST_ARG(__VA_ARGS__, __LINE__)))))
#else
#define FILE_NAME_ARG const CHAR*
#define FW_ASSERT(cond, ...) \
((void) ((cond) ? (0) : \
(Fw::SwAssert(__FILE__, __LINE__, ##__VA_ARGS__))))
#define FW_ASSERT(...) \
((void) ((FW_ASSERT_FIRST_ARG(__VA_ARGS__, 0)) ? (0) : \
(Fw::SwAssert(__FILE__, FW_ASSERT_NO_FIRST_ARG(__VA_ARGS__, __LINE__)))))

Check notice

Code scanning / CodeQL

Undisciplined macro Note

The macro FW_ASSERT(__VA_ARGS__...) is variadic, and hence not allowed.
#endif

// F' Assertion functions can technically return even though the intention is for the assertion to terminate the program.
Expand All @@ -40,13 +46,61 @@
#endif

namespace Fw {
NATIVE_INT_TYPE SwAssert(FILE_NAME_ARG file, NATIVE_UINT_TYPE lineNo) CLANG_ANALYZER_NORETURN; //!< Assert with no arguments
NATIVE_INT_TYPE SwAssert(FILE_NAME_ARG file, NATIVE_UINT_TYPE lineNo, FwAssertArgType arg1) CLANG_ANALYZER_NORETURN; //!< Assert with one argument
NATIVE_INT_TYPE SwAssert(FILE_NAME_ARG file, NATIVE_UINT_TYPE lineNo, FwAssertArgType arg1, FwAssertArgType arg2) CLANG_ANALYZER_NORETURN; //!< Assert with two arguments
NATIVE_INT_TYPE SwAssert(FILE_NAME_ARG file, NATIVE_UINT_TYPE lineNo, FwAssertArgType arg1, FwAssertArgType arg2, FwAssertArgType arg3) CLANG_ANALYZER_NORETURN; //!< Assert with three arguments
NATIVE_INT_TYPE SwAssert(FILE_NAME_ARG file, NATIVE_UINT_TYPE lineNo, FwAssertArgType arg1, FwAssertArgType arg2, FwAssertArgType arg3, FwAssertArgType arg4) CLANG_ANALYZER_NORETURN; //!< Assert with four arguments
NATIVE_INT_TYPE SwAssert(FILE_NAME_ARG file, NATIVE_UINT_TYPE lineNo, FwAssertArgType arg1, FwAssertArgType arg2, FwAssertArgType arg3, FwAssertArgType arg4, FwAssertArgType arg5) CLANG_ANALYZER_NORETURN; //!< Assert with five arguments
NATIVE_INT_TYPE SwAssert(FILE_NAME_ARG file, NATIVE_UINT_TYPE lineNo, FwAssertArgType arg1, FwAssertArgType arg2, FwAssertArgType arg3, FwAssertArgType arg4, FwAssertArgType arg5, FwAssertArgType arg6) CLANG_ANALYZER_NORETURN; //!< Assert with six arguments
//! Assert with no arguments
NATIVE_INT_TYPE SwAssert(
FILE_NAME_ARG file,
NATIVE_UINT_TYPE lineNo) CLANG_ANALYZER_NORETURN;

//! Assert with one argument
NATIVE_INT_TYPE SwAssert(
FILE_NAME_ARG file,
FwAssertArgType arg1,
NATIVE_UINT_TYPE lineNo) CLANG_ANALYZER_NORETURN;

//! Assert with two arguments
NATIVE_INT_TYPE SwAssert(
FILE_NAME_ARG file,
FwAssertArgType arg1,
FwAssertArgType arg2,
NATIVE_UINT_TYPE lineNo) CLANG_ANALYZER_NORETURN;

//! Assert with three arguments
NATIVE_INT_TYPE SwAssert(
FILE_NAME_ARG file,
FwAssertArgType arg1,
FwAssertArgType arg2,
FwAssertArgType arg3,
NATIVE_UINT_TYPE lineNo) CLANG_ANALYZER_NORETURN;

//! Assert with four arguments
NATIVE_INT_TYPE SwAssert(
FILE_NAME_ARG file,
FwAssertArgType arg1,
FwAssertArgType arg2,
FwAssertArgType arg3,
FwAssertArgType arg4,
NATIVE_UINT_TYPE lineNo) CLANG_ANALYZER_NORETURN;

//! Assert with five arguments
NATIVE_INT_TYPE SwAssert(
FILE_NAME_ARG file,
FwAssertArgType arg1,
FwAssertArgType arg2,
FwAssertArgType arg3,
FwAssertArgType arg4,
FwAssertArgType arg5,
NATIVE_UINT_TYPE lineNo) CLANG_ANALYZER_NORETURN;

//! Assert with six arguments
NATIVE_INT_TYPE SwAssert(
FILE_NAME_ARG file,
FwAssertArgType arg1,
FwAssertArgType arg2,
FwAssertArgType arg3,
FwAssertArgType arg4,
FwAssertArgType arg5,
FwAssertArgType arg6,
NATIVE_UINT_TYPE lineNo) CLANG_ANALYZER_NORETURN;
}

// Base class for declaring an assert hook
Expand Down Expand Up @@ -91,4 +145,4 @@
#endif // if ASSERT is defined


#endif
#endif // FW_ASSERT_HPP
Loading