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 #1447, Fix #1438: Event type bitmask derivation and handling improvements #2613

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

thnkslprpt
Copy link
Contributor

@thnkslprpt thnkslprpt commented Oct 13, 2024

Checklist

Describe the contribution

Edit: Ended up combining with the fix for this one, given that the changes are related:

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

@thnkslprpt thnkslprpt force-pushed the fix-1447-derive-event-type-bitmasks-from-enum-definitions branch 3 times, most recently from 8dbbd0b to ed52649 Compare October 13, 2024 10:20

/* 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

This Boolean expression is not side-effect free.

/* 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

This Boolean expression is not side-effect free.
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

This Boolean expression is not side-effect free.

/* 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

This Boolean expression is not side-effect free.
@@ -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

This Boolean expression is not side-effect free.
@@ -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

This Boolean expression is not side-effect free.
@thnkslprpt thnkslprpt force-pushed the fix-1447-derive-event-type-bitmasks-from-enum-definitions branch from ed52649 to 0b1fe43 Compare October 13, 2024 11:35
@thnkslprpt thnkslprpt changed the title Fix #1447, Derive event type bitmasks directly from enum definitions Fix #1447, Fix #1438: Event type bitmask derivation and handling improvements Oct 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Both enums (index) and defines (mask) exist for event type
1 participant