Skip to content

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

Closed
sam-github wants to merge 1 commit into
nodejs:masterfrom
sam-github:fix-c-typdef-warning
Closed

src: use C++ style for struct with initializers#32134
sam-github wants to merge 1 commit into
nodejs:masterfrom
sam-github:fix-c-typdef-warning

Conversation

@sam-github

@sam-githubsam-github commented Mar 7, 2020

Copy link
Copy Markdown
Contributor

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-botnodejs-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
@sam-github
sam-githubforce-pushed the fix-c-typdef-warning branch from e5d9039 to 22f7c71CompareMarch 7, 2020 00:33
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;
^
@sam-github
sam-githubforce-pushed the fix-c-typdef-warning branch from 22f7c71 to 340df52CompareMarch 7, 2020 00:34
@BridgeARBridgeAR 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
Copy Markdown
Collaborator

@danbev

Copy link
Copy Markdown
Contributor

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
Copy Markdown
Contributor

Landed in 811b3a9

@danbevdanbev 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>
@MylesBorinsMylesBorins 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>
@codebyterecodebytere 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 freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author readyPRs 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++.http2Issues or PRs related to the http2 subsystem.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants

@sam-github@nodejs-github-bot@danbev@addaleax@cjihrig@tniessen@devnexen@BridgeAR