Skip to content

Commit eb61e6b

Browse files
authored
Merge pull request #17077 from protocolbuffers/cp-warn
Make the underlying type of the enum by 8-bits instead of using bitfi…
2 parents 9a58f07 + aa7fcb3 commit eb61e6b

File tree

5 files changed

+12
-2
lines changed

5 files changed

+12
-2
lines changed

protos/protos_extension_lock_test.cc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,8 @@ void TestConcurrentExtensionAccess(::protos::ExtensionRegistry registry) {
102102
test_theme();
103103
test_theme_extension();
104104
}
105+
#ifndef _MSC_VER
106+
// TODO Re-enable this once github runner issue is resolved.
105107

106108
TEST(CppGeneratedCode, ConcurrentAccessDoesNotRaceBothLazy) {
107109
::upb::Arena arena;
@@ -120,5 +122,7 @@ TEST(CppGeneratedCode, ConcurrentAccessDoesNotRaceBothEager) {
120122
{{&theme, &ThemeExtension::theme_extension}, arena});
121123
}
122124

125+
#endif // _MSC_VER
126+
123127
} // namespace
124128
} // namespace protos_generator::test::protos

src/google/protobuf/compiler/main.cc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,10 @@ namespace protobuf {
3535
namespace compiler {
3636

3737
int ProtobufMain(int argc, char* argv[]) {
38+
#ifndef _MSC_VER
39+
// TODO Re-enable this once github runner issue is resolved.
3840
absl::InitializeLog();
41+
#endif // !_MSC_VER
3942

4043
CommandLineInterface cli;
4144
cli.AllowPlugins("protoc-");

src/google/protobuf/compiler/main_no_generators.cc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,10 @@ namespace compiler {
1919
// This is a version of protoc that has no built-in code generators.
2020
// See go/protobuf-toolchain-protoc
2121
int ProtocMain(int argc, char* argv[]) {
22+
#ifndef _MSC_VER
23+
// TODO Re-enable this once github runner issue is resolved.
2224
absl::InitializeLog();
25+
#endif // !_MSC_VER
2326

2427
CommandLineInterface cli;
2528
cli.AllowPlugins("protoc-");

src/google/protobuf/descriptor.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2896,7 +2896,7 @@ typename FieldOpts::CType EffectiveStringCType(const FieldDesc* field) {
28962896
}
28972897

28982898
#ifndef SWIG
2899-
enum class Utf8CheckMode {
2899+
enum class Utf8CheckMode : uint8_t {
29002900
kStrict = 0, // Parsing will fail if non UTF-8 data is in string fields.
29012901
kVerify = 1, // Only log an error but parsing will succeed.
29022902
kNone = 2, // No UTF-8 check.

src/google/protobuf/generated_message_tctable_gen.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ struct PROTOBUF_EXPORT TailCallTableInfo {
9696
uint16_t type_card;
9797

9898
// For internal caching.
99-
cpp::Utf8CheckMode utf8_check_mode : 8;
99+
cpp::Utf8CheckMode utf8_check_mode;
100100
};
101101
std::vector<FieldEntryInfo> field_entries;
102102

0 commit comments

Comments
 (0)