Skip to content

Increment/decrement operations mixed with other operators in expression in lc_watch.c and lc_action.c #137

Description

@myc-yang

Checklist (Please check before submitting)

  • I reviewed the Contributing Guide.
  • I performed a cursory search to see if the bug report is relevant, not redundant, nor in conflict with other tickets.

Describe the bug
In lc_watch.c and lc_action.c, increment and/or decrement operations are being used in the same expressions as other operations which can cause errors and make code less comprehensible/readable.

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
According to MISRA C:2012 13.3: A full expression containing an increment (++) or decrement (--) operator should have no other potential side effects other than that caused by the increment or decrement operator.

Code snips
If applicable, add references to the software.

System observed on:

  • Hardware
  • OS: [e.g. Linux 4.4]
  • Versions [e.g. cFE 6.6, OSAL 4.2, PSP 1.3 for mcp750, any related apps]

Additional context
Add any other context about the problem here.

Reporter Info
Michael Yang / NASA/GSFC

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions