-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Correcting NO_ASSERT handling and safety. Fixes #1706, #2447 #2448
Conversation
FW_ASSERT(serializer.serialize(id) == Fw::SerializeStatus::FW_SERIALIZE_OK); | ||
FW_ASSERT(serializer.serialize(timeTag) == Fw::SerializeStatus::FW_SERIALIZE_OK); | ||
FW_ASSERT(serializer.serialize(val) == Fw::SerializeStatus::FW_SERIALIZE_OK); | ||
status = serializer.serialize(id); |
Check warning
Code scanning / CodeQL
Unchecked function argument Warning
FW_ASSERT(serializer.serialize(val) == Fw::SerializeStatus::FW_SERIALIZE_OK); | ||
status = serializer.serialize(id); | ||
FW_ASSERT(status == Fw::SerializeStatus::FW_SERIALIZE_OK); | ||
status = serializer.serialize(timeTag); |
Check warning
Code scanning / CodeQL
Unchecked function argument Warning
FW_ASSERT(status == Fw::SerializeStatus::FW_SERIALIZE_OK); | ||
status = serializer.serialize(timeTag); | ||
FW_ASSERT(status == Fw::SerializeStatus::FW_SERIALIZE_OK); | ||
status = serializer.serialize(val); |
Check warning
Code scanning / CodeQL
Unchecked function argument Warning
FW_ASSERT(serializer.serialize(timeTag) == Fw::SerializeStatus::FW_SERIALIZE_OK); | ||
FW_ASSERT(serializer.serialize(severity) == Fw::SerializeStatus::FW_SERIALIZE_OK); | ||
FW_ASSERT(serializer.serialize(args) == Fw::SerializeStatus::FW_SERIALIZE_OK); | ||
status = serializer.serialize(id); |
Check warning
Code scanning / CodeQL
Unchecked function argument Warning
FW_ASSERT(serializer.serialize(args) == Fw::SerializeStatus::FW_SERIALIZE_OK); | ||
status = serializer.serialize(id); | ||
FW_ASSERT(status == Fw::SerializeStatus::FW_SERIALIZE_OK); | ||
status = serializer.serialize(timeTag); |
Check warning
Code scanning / CodeQL
Unchecked function argument Warning
FW_ASSERT(status == Fw::SerializeStatus::FW_SERIALIZE_OK); | ||
status = serializer.serialize(timeTag); | ||
FW_ASSERT(status == Fw::SerializeStatus::FW_SERIALIZE_OK); | ||
status = serializer.serialize(severity); |
Check warning
Code scanning / CodeQL
Unchecked function argument Warning
FW_ASSERT(status == Fw::SerializeStatus::FW_SERIALIZE_OK); | ||
status = serializer.serialize(severity); | ||
FW_ASSERT(status == Fw::SerializeStatus::FW_SERIALIZE_OK); | ||
status = serializer.serialize(args); |
Check warning
Code scanning / CodeQL
Unchecked function argument Warning
@@ -14,8 +14,8 @@ | |||
namespace Os { | |||
void IntervalTimer::getRawTime(RawTime& time) { | |||
timespec t; | |||
|
|||
FW_ASSERT(clock_gettime(CLOCK_REALTIME,&t) == 0,errno); | |||
PlatformIntType status = clock_gettime(CLOCK_REALTIME,&t); |
Check notice
Code scanning / CodeQL
Use of basic integral type Note
This change is likely going to trip off https://github.com/fprime-community/fprime-tools/blob/c43c85f47f6ae552c68897c456c2ca49bc5dcfcf/.github/workflows/integration-tests.yml#L38-L44 ? |
Change Description
FW_NO_ASSERT was both broken (would not compile) and would introduce bugs into the code. This fixes these issues (#1706, #2447).
FW_NO_ASSERT
does not remove definitions for AssertHook and associated functionsFW_NO_ASSERT
now maintains side-effects from assertion codeFW_NO_ASSERT
Rationale
Bug fixes.
Future Work
Update coding standards.