diff options
author | A. Wilcox <AWilcox@Wilcox-Tech.com> | 2023-02-11 00:38:53 -0600 |
---|---|---|
committer | A. Wilcox <AWilcox@Wilcox-Tech.com> | 2023-02-11 00:38:53 -0600 |
commit | 85b8dd24d4b16e9d12247163cba34de30be47fe1 (patch) | |
tree | 5c3214b6210600e39d8244056ec58540bcee8d00 /user/clucene/narrowing.patch | |
parent | 86c0a8e199e42bee5b5358c4a822912ef4b7ceac (diff) | |
download | packages-85b8dd24d4b16e9d12247163cba34de30be47fe1.tar.gz packages-85b8dd24d4b16e9d12247163cba34de30be47fe1.tar.bz2 packages-85b8dd24d4b16e9d12247163cba34de30be47fe1.tar.xz packages-85b8dd24d4b16e9d12247163cba34de30be47fe1.zip |
user/clucene: More fixes
This doesn't fix the test failure, but is more correct.
Diffstat (limited to 'user/clucene/narrowing.patch')
-rw-r--r-- | user/clucene/narrowing.patch | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/user/clucene/narrowing.patch b/user/clucene/narrowing.patch new file mode 100644 index 000000000..656e5a457 --- /dev/null +++ b/user/clucene/narrowing.patch @@ -0,0 +1,54 @@ +Use larger ints to avoid narrowing casts. + +--- a/src/core/CLucene/queryParser/QueryParser.cpp 2011-03-17 00:21:07.000000000 +0000 ++++ b/src/core/CLucene/queryParser/QueryParser.cpp +@@ -79,8 +79,8 @@ const TCHAR* QueryParserConstants::token + _T("<RANGEEX_GOOP>") + }; + +-const int32_t QueryParser::jj_la1_0[] = {0x180,0x180,0xe00,0xe00,0x1f69f80,0x48000,0x10000,0x1f69000,0x1348000,0x80000,0x80000,0x10000,0x18000000,0x2000000,0x18000000,0x10000,0x80000000,0x20000000,0x80000000,0x10000,0x80000,0x10000,0x1f68000}; +-const int32_t QueryParser::jj_la1_1[] = {0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0x1,0x0,0x0,0x0,0x0}; ++const int64_t QueryParser::jj_la1_0[] = {0x180,0x180,0xe00,0xe00,0x1f69f80,0x48000,0x10000,0x1f69000,0x1348000,0x80000,0x80000,0x10000,0x18000000,0x2000000,0x18000000,0x10000,0x80000000,0x20000000,0x80000000,0x10000,0x80000,0x10000,0x1f68000}; ++const int64_t QueryParser::jj_la1_1[] = {0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x1,0x0,0x1,0x0,0x0,0x0,0x0}; + + struct QueryParser::JJCalls { + public: +--- a/src/core/CLucene/queryParser/QueryParser.h 2011-03-17 00:21:07.000000000 +0000 ++++ b/src/core/CLucene/queryParser/QueryParser.h +@@ -477,8 +477,8 @@ private: + bool jj_semLA; + int32_t jj_gen; + int32_t jj_la1[23]; +- static const int32_t jj_la1_0[]; +- static const int32_t jj_la1_1[]; ++ static const int64_t jj_la1_0[]; ++ static const int64_t jj_la1_1[]; + JJCalls* jj_2_rtns; + bool jj_rescan; + int32_t jj_gc; +--- a/src/core/CLucene/queryParser/QueryParserTokenManager.cpp 2011-03-17 00:21:07.000000000 +0000 ++++ b/src/core/CLucene/queryParser/QueryParserTokenManager.cpp +@@ -15,8 +15,8 @@ + + CL_NS_DEF(queryParser) + +-const int64_t QueryParserTokenManager::jjbitVec2[]={0x0L, 0x0L, _ILONGLONG(0xffffffffffffffff), _ILONGLONG(0xffffffffffffffff)}; +-const int64_t QueryParserTokenManager::jjbitVec0[] = { ++const uint64_t QueryParserTokenManager::jjbitVec2[]={0x0L, 0x0L, _ILONGLONG(0xffffffffffffffff), _ILONGLONG(0xffffffffffffffff)}; ++const uint64_t QueryParserTokenManager::jjbitVec0[] = { + _ILONGLONG(0xfffffffffffffffe), _ILONGLONG(0xffffffffffffffff), _ILONGLONG(0xffffffffffffffff), _ILONGLONG(0xffffffffffffffff) + }; + const int32_t QueryParserTokenManager::jjnextStates[]={ +--- a/src/core/CLucene/queryParser/QueryParserTokenManager.h 2011-03-17 00:21:07.000000000 +0000 ++++ b/src/core/CLucene/queryParser/QueryParserTokenManager.h +@@ -35,8 +35,8 @@ private: + void jjCheckNAddStates(int32_t start, const int32_t end); + void jjCheckNAddStates(const int32_t start); + +- static const int64_t jjbitVec0[]; +- static const int64_t jjbitVec2[]; ++ static const uint64_t jjbitVec0[]; ++ static const uint64_t jjbitVec2[]; + + int32_t jjMoveNfa_3(const int32_t startState, int32_t curPos); + |