-
-
Notifications
You must be signed in to change notification settings - Fork 6.4k
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
fix vs2019 warnings: conversion from 'bit' to 'bool' #4379
Conversation
warning C4244: 'function': conversion from 'bit' to 'bool', possible loss of data
|
See also #4189 which is basically a duplicate. Can we first figure out how we can get these warnings to show up in the existing CI builds? |
It seem there is no VS2019 build on the appveyor build. PEhaps you can add a VS2019 build, or migrate one from VS2017 to 2019
De : Daniel Stenberg [mailto:notifications@github.com]
Envoyé : jeudi 19 septembre 2019 14:08
À : curl/curl
Cc : gvollant; Author
Objet : Re: [curl/curl] fix warning vs2019 (#4379)
See also #4189 <#4189> which is basically a duplicate. Can we first figure out how we can get these warnings to show up in the existing CI builds?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub <#4379?email_source=notifications&email_token=AAIKFN4PPPHKZNLTYCYY3ULQKNTQRA5CNFSM4IYJ24RKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD7DHKNA#issuecomment-533099828> , or mute the thread <https://github.com/notifications/unsubscribe-auth/AAIKFN66LXKVRK4KKTJAW4DQKNTQRANCNFSM4IYJ24RA> . <https://github.com/notifications/beacon/AAIKFNZ7IBNM2AOLGHGH22TQKNTQRA5CNFSM4IYJ24RKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD7DHKNA.gif>
|
I'm surprised that checks are not sucessful with only cast |
Looks like the regular false positives we get... |
The coming VS2019 builds in #4383 show the problems this PR aims to fix. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not a fan of typecasts, but I can't see any better way to address these warnings...
try using _Bool for bit type |
That's a good idea! |
when use a bit variable to call function which need a bool, Visual Studio 2019 display:
warning C4244: 'function': conversion from 'bit' to 'bool', possible loss of data
This simple PR just add a (bool) cast