jrullan / StateMachine

State machine library for Arduino
MIT License
138 stars 26 forks source link

warning: 'typedef' was ignored in this declaration typedef struct Transition{ [...] #7

Open dbartelmus opened 3 years ago

dbartelmus commented 3 years ago

In State.h, the following error since some Arduino IDE update: Arduino/libraries/StateMachine/src/State.h:11:1: warning: 'typedef' was ignored in this declaration typedef struct Transition{ ^~~~~~~

I can read on Stack Overflow that:

It is a degenerate syntax that is allowed but provides no benefit. Most modern compilers can be provoked into emitting a warning about it; by default, they may not. [...] C Standard In ISO/IEC 9899:1999 (that's the C standard), we find: §6.7 Declarations Syntax declaration: [...]

Source: https://stackoverflow.com/a/6399998/5631432

I delete "typedef" before "struct Transition{" in State.h and there is no more warning about this.

Let me know what you think.

Btw. thank you for your library