Menu ▾ ▴

#228 Transitions defined only in Default state cause unused-function warnings

SMC 7.3.0
closed-fixed
None
5
2021-11-11
2021-08-20
David Rea
No

Transitions appearing in a C-language statemap end up in a list of transition functions (delcared static) that are subsequently #define-macro'd to state-specific substitutes.

If a transition only appears in the Default state, that transition function's xyzMap_DefaultState_transitionName macro gets #undef'd and replaced by another static function, xyzMap_DefaultState_transitionName(...) lower down in the generated .c file.

This creates an unused function warning, similar to ticket #224, even after the transition is called from client code. Many organizations standardize on running gcc with -Wall -Werror, requiring file-wise workarounds to disable this warning.

Discussion

  • Charles Rapp

    Charles Rapp - 2021-10-02
    • status: open --> open-accepted
    • assigned_to: Charles Rapp
     
  • Charles Rapp

    Charles Rapp - 2021-11-11
    • Group: Assigned --> SMC 7.3.0
     
  • Charles Rapp

    Charles Rapp - 2021-11-11
    • status: open-accepted --> closed-fixed
     

Log in to post a comment.