Skip to content

[-Wnon-c-typedef-for-linkage] warning for Connection struct #16

Closed

Description

@Jadit19
In file included from /Users/adit/projects/expresso/lib/mochios/src/client/client.cpp:1:
In file included from /Users/adit/projects/expresso/lib/mochios/include/mochios/client/client.h:10:
/Users/adit/projects/expresso/lib/mochios/include/mochios/client/options.h:9:15: warning: anonymous non-C-compatible type given name for linkage purposes by typedef declaration; add a tag name here [-Wnon-c-typedef-for-linkage]
    9 | typedef struct {
      |               ^
      |                Connection
/Users/adit/projects/expresso/lib/mochios/include/mochios/client/options.h:12:26: note: type is not C-compatible due to this default member initializer
   12 |   unsigned int timeout = 2;
      |                          ^
/Users/adit/projects/expresso/lib/mochios/include/mochios/client/options.h:13:3: note: type is given name 'Connection' for linkage purposes by this typedef declaration
   13 | } Connection;
      |   ^

Activity

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions