Skip to content

Resolve cppcheck issues (and confirm they are getting flagged correctly) #216

@skliper

Description

@skliper

Checklist (Please check before submitting)

  • I reviewed the Contributing Guide.
  • I reviewed the CF README.md file to see if the feature is in the major future work.
  • I performed a cursory search to see if the feature request is relevant, not redundant, nor in conflict with other tickets.

Is your feature request related to a problem? Please describe.
Style warnings when running strict cppcheck:

$ cppcheck --force --inline-suppr --std=c99 --language=c --enable=warning,performance,portability,style --suppress=variableScope –inconclusive fsw/
...
[fsw/src/cf_codec.c:362] -> [fsw/src/cf_codec.c:364]: (style) Variable 'Limit' is reassigned a value before the old one has been used.
[fsw/src/cf_codec.c:669]: (style) Redundant pointer operation on 'optional_fields' - it's already a pointer.
[fsw/src/cf_codec.c:793]: (style) Redundant pointer operation on 'pecrc' - it's already a pointer.
[fsw/src/cf_codec.c:1067]: (style) Redundant pointer operation on 'plcrc' - it's already a pointer.
[fsw/src/cf_codec.c:1067]: (style) Redundant pointer operation on 'pecrc' - it's already a pointer.

Describe the solution you'd like
Confirm these are getting flagged in CI.

Describe alternatives you've considered
None

Additional context

Requester Info
Jacob Hageman - NASA/GSFC

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions