Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

src: use C++ style for struct with initializers #32134

Closed
wants to merge 1 commit into from

Conversation

sam-github
Copy link
Contributor

@sam-github sam-github commented Mar 7, 2020

Fixes warning on clang 11:

  In file included from ../../src/node_http2.cc:6:
  ../../src/node_http2.h:508: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]
  typedef struct {
                ^
                 SessionJSFields
  ../../src/node_http2.h:512:33: note: type is not C-compatible due to this default member initializer
    uint32_t max_invalid_frames = 1000;
                                  ^~~~
  ../../src/node_http2.h:514:3: note: type is given name 'SessionJSFields' for linkage purposes by this typedef declaration
  } SessionJSFields;
    ^
Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • commit message follows commit guidelines

@nodejs-github-bot nodejs-github-bot added c++ Issues and PRs that require attention from people who are familiar with C++. http2 Issues or PRs related to the http2 subsystem. labels Mar 7, 2020
Fixes warning on clang 11:

        In file included from ../../src/node_http2.cc:6:
        ../../src/node_http2.h:508: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]
        typedef struct {
                      ^
                       SessionJSFields
        ../../src/node_http2.h:512:33: note: type is not C-compatible due to this default member initializer
          uint32_t max_invalid_frames = 1000;
                                        ^~~~
        ../../src/node_http2.h:514:3: note: type is given name 'SessionJSFields' for linkage purposes by this typedef declaration
        } SessionJSFields;
          ^
@BridgeAR BridgeAR added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Mar 9, 2020
@nodejs-github-bot
Copy link
Collaborator

@danbev
Copy link
Contributor

danbev commented Mar 10, 2020

Re-run of failing node-test-commit-osx/ ✔️

danbev pushed a commit that referenced this pull request Mar 10, 2020
Fixes warning on clang 11:

        In file included from ../../src/node_http2.cc:6:
        ../../src/node_http2.h:508: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]
        typedef struct {
                      ^
                       SessionJSFields
        ../../src/node_http2.h:512:33: note: type is not C-compatible due to this default member initializer
          uint32_t max_invalid_frames = 1000;
                                        ^~~~
        ../../src/node_http2.h:514:3: note: type is given name 'SessionJSFields' for linkage purposes by this typedef declaration
        } SessionJSFields;
          ^

PR-URL: #32134
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: David Carlier <devnexen@gmail.com>
@danbev
Copy link
Contributor

danbev commented Mar 10, 2020

Landed in 811b3a9

@danbev danbev closed this Mar 10, 2020
MylesBorins pushed a commit that referenced this pull request Mar 10, 2020
Fixes warning on clang 11:

        In file included from ../../src/node_http2.cc:6:
        ../../src/node_http2.h:508: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]
        typedef struct {
                      ^
                       SessionJSFields
        ../../src/node_http2.h:512:33: note: type is not C-compatible due to this default member initializer
          uint32_t max_invalid_frames = 1000;
                                        ^~~~
        ../../src/node_http2.h:514:3: note: type is given name 'SessionJSFields' for linkage purposes by this typedef declaration
        } SessionJSFields;
          ^

PR-URL: #32134
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: David Carlier <devnexen@gmail.com>
@MylesBorins MylesBorins mentioned this pull request Mar 10, 2020
@sam-github sam-github deleted the fix-c-typdef-warning branch March 20, 2020 21:35
codebytere pushed a commit that referenced this pull request Mar 23, 2020
Fixes warning on clang 11:

        In file included from ../../src/node_http2.cc:6:
        ../../src/node_http2.h:508: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]
        typedef struct {
                      ^
                       SessionJSFields
        ../../src/node_http2.h:512:33: note: type is not C-compatible due to this default member initializer
          uint32_t max_invalid_frames = 1000;
                                        ^~~~
        ../../src/node_http2.h:514:3: note: type is given name 'SessionJSFields' for linkage purposes by this typedef declaration
        } SessionJSFields;
          ^

PR-URL: #32134
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: David Carlier <devnexen@gmail.com>
@codebytere codebytere mentioned this pull request Mar 24, 2020
codebytere pushed a commit that referenced this pull request Mar 30, 2020
Fixes warning on clang 11:

        In file included from ../../src/node_http2.cc:6:
        ../../src/node_http2.h:508: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]
        typedef struct {
                      ^
                       SessionJSFields
        ../../src/node_http2.h:512:33: note: type is not C-compatible due to this default member initializer
          uint32_t max_invalid_frames = 1000;
                                        ^~~~
        ../../src/node_http2.h:514:3: note: type is given name 'SessionJSFields' for linkage purposes by this typedef declaration
        } SessionJSFields;
          ^

PR-URL: #32134
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: David Carlier <devnexen@gmail.com>
codebytere pushed a commit that referenced this pull request Mar 31, 2020
Fixes warning on clang 11:

        In file included from ../../src/node_http2.cc:6:
        ../../src/node_http2.h:508: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]
        typedef struct {
                      ^
                       SessionJSFields
        ../../src/node_http2.h:512:33: note: type is not C-compatible due to this default member initializer
          uint32_t max_invalid_frames = 1000;
                                        ^~~~
        ../../src/node_http2.h:514:3: note: type is given name 'SessionJSFields' for linkage purposes by this typedef declaration
        } SessionJSFields;
          ^

PR-URL: #32134
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: David Carlier <devnexen@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
author ready PRs that have at least one approval, no pending requests for changes, and a CI started. c++ Issues and PRs that require attention from people who are familiar with C++. http2 Issues or PRs related to the http2 subsystem.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

8 participants