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: fix warnings on SPrintF #32558

Closed
wants to merge 1 commit into from
Closed

Conversation

himself65
Copy link
Member

@himself65 himself65 commented Mar 30, 2020

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 function template 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 function template 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 function template 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 function template 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 function template 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 function template 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 function template 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 function template 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 function template 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-bot nodejs-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.

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

@addaleax addaleax 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
Collaborator

@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

@addaleax
Copy link
Member

addaleax commented Apr 6, 2020

Landed in d3af1fe

@addaleax addaleax 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>
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>
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++.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants