You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudberry.apache.org by le...@apache.org on 2026/09/11 14:32:36 UTC

(cloudberry) branch main updated: Fix PAX protobuf array bounds warnings

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

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


The following commit(s) were added to refs/heads/main by this push:
     new 238feec82c8 Fix PAX protobuf array bounds warnings
238feec82c8 is described below

commit 238feec82c8127174ac00fdcbb5c6bae7ee58c26
Author: krylosov-aa <kr...@gmail.com>
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: commits-unsubscribe@cloudberry.apache.org
For additional commands, e-mail: commits-help@cloudberry.apache.org