-
Notifications
You must be signed in to change notification settings - Fork 207
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 #1447, Fix #1438: Event type bitmask derivation and handling improvements #2613
base: main
Are you sure you want to change the base?
Fix #1447, Fix #1438: Event type bitmask derivation and handling improvements #2613
Conversation
8dbbd0b
to
ed52649
Compare
|
||
/* Need to check for an out of range bitmask, since oue bit masks are only 4 bits */ | ||
if (CmdPtr->BitMask == 0x0 || CmdPtr->BitMask > 0x0F) | ||
if (EVS_IsInvalidBitMask(CmdPtr->BitMask, CFE_EVS_ENABLE_PORTS_CC)) |
Check warning
Code scanning / CodeQL
Side effect in a Boolean expression Warning
|
||
/* Need to check for an out of range bitmask, since oue bit masks are only 4 bits */ | ||
if (CmdPtr->BitMask == 0x0 || CmdPtr->BitMask > 0x0F) | ||
if (EVS_IsInvalidBitMask(CmdPtr->BitMask, CFE_EVS_DISABLE_PORTS_CC)) |
Check warning
Code scanning / CodeQL
Side effect in a Boolean expression Warning
EVS_AppData_t * AppDataPtr; | ||
|
||
/* Need to check for an out of range bitmask, since our bit masks are only 4 bits */ | ||
if (CmdPtr->BitMask == 0x0 || CmdPtr->BitMask > 0x0F) | ||
if (EVS_IsInvalidBitMask(CmdPtr->BitMask, CFE_EVS_ENABLE_EVENT_TYPE_CC)) |
Check warning
Code scanning / CodeQL
Side effect in a Boolean expression Warning
|
||
/* Need to check for an out of range bitmask, since our bit masks are only 4 bits */ | ||
if (CmdPtr->BitMask == 0x0 || CmdPtr->BitMask > 0x0F) | ||
if (EVS_IsInvalidBitMask(CmdPtr->BitMask, CFE_EVS_DISABLE_EVENT_TYPE_CC)) |
Check warning
Code scanning / CodeQL
Side effect in a Boolean expression Warning
@@ -676,11 +656,8 @@ | |||
if (Status == CFE_SUCCESS) | |||
{ | |||
/* Need to check for an out of range bitmask, since our bit masks are only 4 bits */ | |||
if (CmdPtr->BitMask == 0x0 || CmdPtr->BitMask > 0x0F) | |||
if (EVS_IsInvalidBitMask(CmdPtr->BitMask, CFE_EVS_ENABLE_APP_EVENT_TYPE_CC)) |
Check warning
Code scanning / CodeQL
Side effect in a Boolean expression Warning
@@ -738,11 +715,8 @@ | |||
if (Status == CFE_SUCCESS) | |||
{ | |||
/* Need to check for an out of range bitmask, since our bit masks are only 4 bits */ | |||
if (CmdPtr->BitMask == 0x0 || CmdPtr->BitMask > 0x0F) | |||
if (EVS_IsInvalidBitMask(CmdPtr->BitMask, CFE_EVS_DISABLE_APP_EVENT_TYPE_CC)) |
Check warning
Code scanning / CodeQL
Side effect in a Boolean expression Warning
ed52649
to
0b1fe43
Compare
Checklist
Describe the contribution
CFE_EVS_EventOutput_Enum_t
labels (CFE_EVS_EventOutput_PORT1
etc.) are not actually used - so could potentially just be completely removed.Edit: Ended up combining with the fix for this one, given that the changes are related:
EVS_SendEvent()
from 6 down to 1).0x0F
) with a new macroCFE_EVS_ALL_EVENT_TYPES_MASK
Testing performed
GitHub CI actions all passing successfully (incl. Build + Run, Unit/Functional Tests etc.).
Expected behavior changes
Logic unchanged.
Will make it impossible for these to get out-of-sync in the future.
System(s) tested on
Debian 12 using the current main branch of cFS bundle.
Contributor Info
Avi Weiss @thnkslprpt