Skip to content

src: fix warnings on SPrintF - #32558

Closed
himself65 wants to merge 1 commit into
nodejs:masterfrom
himself65:20200330-fix
Closed

src: fix warnings on SPrintF#32558
himself65 wants to merge 1 commit into
nodejs:masterfrom
himself65:20200330-fix

Conversation

@himself65

@himself65himself65 commented Mar 30, 2020

Copy link
Copy Markdown
Member

Refs: #32551 (comment)#32385 (review)

Previous error message on Windows:

C:\Users\jasne\Projects\node\src\node_http2.cc(2738,13): warning C4244: 'initializing': conversion from 'T' to 'int', possible loss of data [C:\Users\jasne\Projects\node\libnode.vcxproj]
with
[
T=int64_t
]
C:\Users\jasne\Projects\node\src\debug_utils-inl.h(39,1): warning C4806: '&': unsafe operation: no value of type'T' promoted to type'int' can equal the given constant [C:\Users\jasne\Projects\node\libnode.vcxproj]
with
[
T=bool
]
C:\Users\jasne\Projects\node\src\debug_utils-inl.h(60): message : see reference to functiontemplate instantiation 'std::string node::ToStringHelper::BaseConvert<3,bool,0>(T)' being compiled [C:\Users\jasne\Projects\node\lib
node.vcxproj]
with
[
T=bool
]
C:\Users\jasne\Projects\node\src\debug_utils-inl.h(97): message : see reference to functiontemplate instantiation 'std::string node::ToBaseString<3,bool&>(T)' being compiled [C:\Users\jasne\Projects\node\libnode.vcxproj]
with
[
T=bool &
]
C:\Users\jasne\Projects\node\src\debug_utils-inl.h(117): message : see reference to functiontemplate instantiation 'std::string node::SPrintFImpl<bool&,>(const char *,Arg)' being compiled [C:\Users\jasne\Projects\node\libno
de.vcxproj]
with
[
Arg=bool &
]
C:\Users\jasne\Projects\node\src\debug_utils-inl.h(117): message : see reference to functiontemplate instantiation 'std::string node::SPrintFImpl<int&,bool&>(const char *,Arg,bool &)' being compiled [C:\Users\jasne\Projects
\node\libnode.vcxproj]
with
[
Arg=int &
]
C:\Users\jasne\Projects\node\src\debug_utils-inl.h(123): message : see reference to functiontemplate instantiation 'std::string node::SPrintFImpl<int&,int&,bool&>(const char *,Arg,int &,bool &)' being compiled [C:\Users\jas
ne\Projects\node\libnode.vcxproj]
with
[
Arg=int &
]
C:\Users\jasne\Projects\node\src\debug_utils-inl.h(128): message : see reference to functiontemplate instantiation 'std::string node::SPrintF<int&,int&,bool&>(const char *,int &,int &,bool &)' being compiled [C:\Users\jasne
\Projects\node\libnode.vcxproj]
C:\Users\jasne\Projects\node\src\debug_utils-inl.h(137): message : see reference to functiontemplate instantiation 'void node::FPrintF<int&,int&,bool&>(FILE *,const char *,int &,int &,bool &)' being compiled [C:\Users\jasne
\Projects\node\libnode.vcxproj]
C:\Users\jasne\Projects\node\src\debug_utils-inl.h(150): message : see reference to functiontemplate instantiation 'void node::Debug<int32_t&,int32_t&,bool&>(node::EnabledDebugList *,node::DebugCategory,const char *,int32_t &,int32_t &,bool &)' being compiled [C:\Users\jasne\Projects\node\libnode.vcxproj]
C:\Users\jasne\Projects\node\src\node_http2.cc(354): message : see reference to functiontemplate instantiation 'void node::Debug<int32_t&,int32_t&,bool&>(node::Environment *,node::DebugCategory,const char *,int32_t &,int32_t &,bool &)' being compiled [C:\Users\jasne\Projects\node\libnode.vcxproj]
C:\Users\jasne\Projects\node\src\debug_utils-inl.h(42,1): warning C4804: '>>=': unsafe use of type'bool'in operation [C:\Users\jasne\Projects\node\libnode.vcxproj]
Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • commit message follows commit guidelines

@nodejs-github-botnodejs-github-bot added the c++ Issues and PRs that require attention from people who are familiar with C++. label Mar 30, 2020
@himself65

This comment has been minimized.

@himself65himself65 changed the title src: fix warnings on SPrintF[WIP]src: fix warnings on SPrintFMar 30, 2020
@himself65
himself65 marked this pull request as ready for review March 30, 2020 09:30
@himself65himself65 changed the title [WIP]src: fix warnings on SPrintFsrc: fix warnings on SPrintFMar 30, 2020
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@addaleaxaddaleax added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Apr 2, 2020
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@addaleax

Copy link
Copy Markdown
Member

Landed in d3af1fe

@addaleaxaddaleax closed this Apr 6, 2020
addaleax pushed a commit that referenced this pull request Apr 6, 2020
PR-URL: #32558
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
BethGriggs pushed a commit that referenced this pull request Apr 7, 2020
PR-URL: #32558
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
targos pushed a commit that referenced this pull request Apr 12, 2020
PR-URL: #32558
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
@targostargos mentioned this pull request Apr 13, 2020
targos pushed a commit that referenced this pull request Apr 22, 2020
PR-URL: #32558
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
@targostargos mentioned this pull request Apr 22, 2020
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++.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@himself65@nodejs-github-bot@addaleax@jasnell