Skip to content

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

Description

@dbartelmus

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

Activity

  1. aaaidan commented on Dec 29, 2024

    @aaaidan

    FYI This was resolved in PR #3, which has been merged. Upgrading to v1.0.13b (or later) should resolve the warning.

    I think this issue can be closed as it has been addressed.

    Edit: The latest version published on platformio is v1.0.11, so this issue is outstanding until a more recent version is published. As a workaround, you can install v1.0.13b by using a direct link to github's tar of the tag.

    For example, in your project's platformio.ini, replace: jrullan/StateMachine@^1.0.11 with https://github.com/jrullan/StateMachine/archive/refs/tags/v1.0.13b.tar.gz, Then run pio pkg install --force

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions