-
Notifications
You must be signed in to change notification settings - Fork 10.6k
Closed
Labels
Description
When building with gcc 10 and using the -Wconversion flag in my project, I have the following error:
_deps/googletest-src/googlemock/src/gmock-internal-utils.cc: In function ‘bool testing::internal::Base64Unescape(const string&, std::string*)’:
_deps/googletest-src/googlemock/src/gmock-internal-utils.cc:237:11: warning: conversion from ‘int’ to ‘char’ may change value [-Wconversion]
237 | dst |= src_bin << 2;
The implicit conversion happens here:
| dst |= src_bin << 2; |
This can be fixed by adding a cast like:
dst |= static_cast<char>(src_bin << 2);
If it's okay, I'd be happy to submit a pull request to solve this issue.
Does the bug persist in the most recent commit?
Yes
What operating system and version are you using?
Ubuntu 20.04.3 LTS
What compiler and version are you using?
gcc version 10.3.0 (Ubuntu 10.3.0-1ubuntu1~20.04)
What build system are you using?
cmake version 3.16.3
081236785864 and Rebraws