Skip to content

Conversation

@avan989
Copy link
Contributor

@avan989 avan989 commented Dec 18, 2019

Describe the contribution

resolve cpp check

Testing performed
Steps taken to test the contribution:

  1. cppcheck --force --inline-suppr --std=c99 --language=c --error-exitcode=1 --enable=warning,performance,portability,style --suppress=variableScope --inconclusive fsw/cfe-core/src 2>cppcheck_flight_cfe.txt

System(s) tested on:

  • Hardware
  • Ubuntu 18.04
  • CFE 6.6

Additional context
Add any other context about the contribution here.

Contributor Info
Anh Van, NASA Goddard

Comment on lines 112 to 113
/* cppcheck-suppress unusedVariable */
uint16 size;

#ifdef MESSAGE_FORMAT_IS_CCSDS
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can suppression be removed if uint16 size; is inside #ifdef?

Comment on lines 708 to 709
/* cppcheck-suppress unreadVariable */
CFE_SB_MsgId_Atom_t Val = MsgId;

#ifdef MESSAGE_FORMAT_IS_CCSDS
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can suppression be removed if line is moved within ifdef?

/* cppcheck-suppress unusedVariable */
CFE_SB_MsgKey_Atom_t KeyVal;

#ifdef MESSAGE_FORMAT_IS_CCSDS
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can suppression be removed if line is within ifdef?

@skliper skliper added this to the 6.8.0 milestone Dec 30, 2019
Copy link
Contributor

@CDKnightNASA CDKnightNASA left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. Always prefer initializing variables at declaration time.

@avan989
Copy link
Contributor Author

avan989 commented Jan 8, 2020

updated.

@skliper skliper added the CCB:Approved Indicates code review and approval by community CCB label Jan 10, 2020
@skliper
Copy link
Contributor

skliper commented Jan 10, 2020

CCB 20190108 - Reviewed and approved for integration candidate

@skliper skliper changed the base branch from master to merge-20200108 January 10, 2020 15:11
@skliper skliper merged commit c476eda into nasa:merge-20200108 Jan 10, 2020
skliper pushed a commit that referenced this pull request Jan 10, 2020
Fix #259 #425 #427 #435 #437 #438 #443 #445
Reviewed and approved at 2020-01-08 CCB
skliper pushed a commit that referenced this pull request Jan 14, 2020
@skliper skliper linked an issue Sep 24, 2021 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CCB:Approved Indicates code review and approval by community CCB enhancement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

cppcheck for cfe-core/src

4 participants