mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-07-03 03:01:44 +00:00
[wpiutil] Add protobuf to thirdparty sources (#5746)
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Johnson <johnson.peter@gmail.com>
|
||||
Date: Sat, 10 Jun 2023 15:13:45 -0700
|
||||
Subject: [PATCH 05/11] Suppress enum-enum conversion warning
|
||||
|
||||
---
|
||||
src/google/protobuf/generated_message_tctable_impl.h | 9 +++++++++
|
||||
1 file changed, 9 insertions(+)
|
||||
|
||||
diff --git a/src/google/protobuf/generated_message_tctable_impl.h b/src/google/protobuf/generated_message_tctable_impl.h
|
||||
index 21fa5332d39b24e0bdb6432f27183df743d512c6..ce3d9110e28706ca18dcf0f2c94feba75f447dc7 100644
|
||||
--- a/src/google/protobuf/generated_message_tctable_impl.h
|
||||
+++ b/src/google/protobuf/generated_message_tctable_impl.h
|
||||
@@ -180,6 +180,12 @@ static_assert(kFmtShift + kFmtBits == 12, "number of bits changed");
|
||||
// This assertion should not change unless the storage width changes:
|
||||
static_assert(kFmtShift + kFmtBits <= 16, "too many bits");
|
||||
|
||||
+#ifdef __GNUC__
|
||||
+#pragma GCC diagnostic push
|
||||
+#if __GNUC__ >= 12 || (__GNUC__ == 11 && __GNUC_MINOR >= 1)
|
||||
+#pragma GCC diagnostic ignored "-Wdeprecated-enum-enum-conversion"
|
||||
+#endif
|
||||
+#endif
|
||||
// Convenience aliases (16 bits, with format):
|
||||
enum FieldType : uint16_t {
|
||||
// Numeric types:
|
||||
@@ -232,6 +238,9 @@ enum FieldType : uint16_t {
|
||||
// Map types:
|
||||
kMap = kFkMap,
|
||||
};
|
||||
+#ifdef __GNUC__
|
||||
+#pragma GCC diagnostic pop
|
||||
+#endif
|
||||
|
||||
// clang-format on
|
||||
} // namespace field_layout
|
||||
Reference in New Issue
Block a user