This is an automated email from the ASF dual-hosted git repository.

leborchuk pushed a commit to branch REL_2_STABLE
in repository https://gitbox.apache.org/repos/asf/cloudberry.git

commit e1c0774b5e267c344cde87e69d06fa78a3ac95ce
Author: krylosov-aa <[email protected]>
AuthorDate: Fri Sep 11 00:25:29 2026 +0300

    Fix PAX protobuf array bounds warnings
    
    Suppress false GCC 14 array bounds warnings in protobuf 3.19 headers.
    Limit the suppression to protobuf includes and restore diagnostics
    for PAX code.
    
    See: https://github.com/apache/cloudberry/issues/1677
---
 contrib/pax_storage/src/cpp/storage/proto/proto_wrappers.h | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/contrib/pax_storage/src/cpp/storage/proto/proto_wrappers.h 
b/contrib/pax_storage/src/cpp/storage/proto/proto_wrappers.h
index 3e57167f334..81422fd79bb 100644
--- a/contrib/pax_storage/src/cpp/storage/proto/proto_wrappers.h
+++ b/contrib/pax_storage/src/cpp/storage/proto/proto_wrappers.h
@@ -35,9 +35,19 @@
 #undef Min
 #undef Max
 #undef IsPowerOf2
+
+// GCC 14 emits false -Warray-bounds warnings in protobuf 3.19 headers.
+#if defined(__GNUC__) && !defined(__clang__)
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Warray-bounds"
+#endif
 #include "storage/proto/micro_partition_stats.pb.h"
 #include "storage/proto/orc_proto.pb.h"
 #include "storage/proto/pax.pb.h"
+#if defined(__GNUC__) && !defined(__clang__)
+#pragma GCC diagnostic pop
+#endif
+
 #define FATAL 22
 #define Min(x, y) ((x) < (y) ? (x) : (y))
 #define Max(x, y) ((x) > (y) ? (x) : (y))


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to