This is an automated email from the ASF dual-hosted git repository.
airborne pushed a commit to branch clucene
in repository https://gitbox.apache.org/repos/asf/doris-thirdparty.git
The following commit(s) were added to refs/heads/clucene by this push:
new aef5c9ccda3 [fix](clucene) Fix GCC -Werror compilation errors (#384)
aef5c9ccda3 is described below
commit aef5c9ccda30cc8db12410c17057ff1eb5c48e03
Author: Jack <[email protected]>
AuthorDate: Sat Mar 14 22:16:39 2026 +0800
[fix](clucene) Fix GCC -Werror compilation errors (#384)
- _SegmentHeader.h: Reorder TermDocsBuffer constructor initializer list
to match member declaration order, fixing -Werror=reorder
- _TermVector.h: Suppress -Winaccessible-base for SegmentTermPositionVector
diamond inheritance with GCC pragma, avoiding virtual inheritance which
would break static_cast in TermVectorReader
---
src/core/CLucene/index/_SegmentHeader.h | 6 +++---
src/core/CLucene/index/_TermVector.h | 7 +++++++
2 files changed, 10 insertions(+), 3 deletions(-)
diff --git a/src/core/CLucene/index/_SegmentHeader.h
b/src/core/CLucene/index/_SegmentHeader.h
index 80ab2331265..4223d6c962b 100644
--- a/src/core/CLucene/index/_SegmentHeader.h
+++ b/src/core/CLucene/index/_SegmentHeader.h
@@ -36,11 +36,11 @@ public:
: docs_(PFOR_BLOCK_SIZE + 3),
freqs_(PFOR_BLOCK_SIZE + 3),
norms_(PFOR_BLOCK_SIZE + 3),
- maxDoc(maxDoc),
freqStream_(freqStream),
+ maxDoc(maxDoc),
hasProx_(hasProx),
- indexVersion_(indexVersion),
- compatibleRead_(compatibleRead) {
+ compatibleRead_(compatibleRead),
+ indexVersion_(indexVersion) {
}
~TermDocsBuffer() {
diff --git a/src/core/CLucene/index/_TermVector.h
b/src/core/CLucene/index/_TermVector.h
index faf165d7410..8a406455aee 100644
--- a/src/core/CLucene/index/_TermVector.h
+++ b/src/core/CLucene/index/_TermVector.h
@@ -167,6 +167,10 @@ public:
};
+#ifdef __GNUC__
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Winaccessible-base"
+#endif
class SegmentTermPositionVector: public SegmentTermVector, public
TermPositionVector {
protected:
CL_NS(util)::ArrayBase< CL_NS(util)::ArrayBase<int32_t>* >* positions;
@@ -207,6 +211,9 @@ public:
virtual TermPositionVector* __asTermPositionVector();
};
+#ifdef __GNUC__
+#pragma GCC diagnostic pop
+#endif
/**
* The TermVectorMapper can be used to map Term Vectors into your own
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]