Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 25 Jun 2014 04:42:15 +0000 (UTC)
From:      Jung-uk Kim <jkim@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r359182 - in head/textproc/clucene: . files
Message-ID:  <201406250442.s5P4gFvo066129@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jkim
Date: Wed Jun 25 04:42:15 2014
New Revision: 359182
URL: http://svnweb.freebsd.org/changeset/ports/359182
QAT: https://qat.redports.org/buildarchive/r359182/

Log:
  Fix compiler warnings.  Note some patches were obtained from LibreOffice.

Added:
  head/textproc/clucene/files/patch-src__core__CLucene__analysis__AnalysisHeader.cpp   (contents, props changed)
  head/textproc/clucene/files/patch-src__core__CLucene__index__DocumentsWriterThreadState.cpp   (contents, props changed)
  head/textproc/clucene/files/patch-src__core__CLucene__index__IndexFileDeleter.cpp   (contents, props changed)
  head/textproc/clucene/files/patch-src__core__CLucene__index__IndexWriter.h   (contents, props changed)
  head/textproc/clucene/files/patch-src__core__CLucene__index__TermInfosReader.cpp   (contents, props changed)
  head/textproc/clucene/files/patch-src__core__CLucene__queryParser__QueryParser.cpp   (contents, props changed)
  head/textproc/clucene/files/patch-src__core__CLucene__queryParser__QueryParserTokenManager.cpp   (contents, props changed)
  head/textproc/clucene/files/patch-src__core__CLucene__queryParser__legacy__Lexer.cpp   (contents, props changed)
  head/textproc/clucene/files/patch-src__core__CLucene__store__FSDirectory.cpp   (contents, props changed)
  head/textproc/clucene/files/patch-src__core__CLucene__store__IndexInput.cpp   (contents, props changed)
  head/textproc/clucene/files/patch-src__shared__CLucene__LuceneThreads.h
     - copied unchanged from r359181, head/textproc/clucene/files/patch-libc++
  head/textproc/clucene/files/patch-src__shared__cmake__CheckHashmaps.cmake   (contents, props changed)
Deleted:
  head/textproc/clucene/files/patch-libc++
Modified:
  head/textproc/clucene/Makefile
  head/textproc/clucene/files/patch-src__core__CLucene__index__IndexWriter.cpp
  head/textproc/clucene/files/patch-src__core__CLucene__util__VoidMap.h

Modified: head/textproc/clucene/Makefile
==============================================================================
--- head/textproc/clucene/Makefile	Wed Jun 25 03:47:31 2014	(r359181)
+++ head/textproc/clucene/Makefile	Wed Jun 25 04:42:15 2014	(r359182)
@@ -3,7 +3,7 @@
 
 PORTNAME=	clucene
 PORTVERSION=	2.3.3.4
-PORTREVISION=	3
+PORTREVISION=	4
 CATEGORIES=	textproc
 MASTER_SITES=	SF/${PORTNAME}/${PORTNAME}-core-unstable/2.3
 DISTNAME=	${PORTNAME}-core-${PORTVERSION}

Added: head/textproc/clucene/files/patch-src__core__CLucene__analysis__AnalysisHeader.cpp
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/textproc/clucene/files/patch-src__core__CLucene__analysis__AnalysisHeader.cpp	Wed Jun 25 04:42:15 2014	(r359182)
@@ -0,0 +1,11 @@
+--- src/core/CLucene/analysis/AnalysisHeader.cpp.orig	2011-03-16 20:21:07.000000000 -0400
++++ src/core/CLucene/analysis/AnalysisHeader.cpp	2014-06-24 18:57:17.000000000 -0400
+@@ -212,7 +212,7 @@
+     sb.append(_T(","));
+     sb.appendInt( _endOffset );
+ 
+-    if (!_tcscmp( _type, _T("word")) == 0 ){
++    if (_tcscmp( _type, _T("word")) != 0) {
+       sb.append(_T(",type="));
+       sb.append(_type);
+     }

Added: head/textproc/clucene/files/patch-src__core__CLucene__index__DocumentsWriterThreadState.cpp
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/textproc/clucene/files/patch-src__core__CLucene__index__DocumentsWriterThreadState.cpp	Wed Jun 25 04:42:15 2014	(r359182)
@@ -0,0 +1,21 @@
+--- src/core/CLucene/index/DocumentsWriterThreadState.cpp.orig	2011-03-16 20:21:07.000000000 -0400
++++ src/core/CLucene/index/DocumentsWriterThreadState.cpp	2014-06-24 18:37:18.000000000 -0400
+@@ -994,7 +994,7 @@
+   const TCHAR* tokenText = token->termBuffer();
+   const int32_t tokenTextLen = token->termLength();
+ 
+-  int32_t code = 0;
++  uint32_t code = 0;
+ 
+   // Compute hashcode
+   int32_t downto = tokenTextLen;
+@@ -1203,7 +1203,8 @@
+   const int32_t newMask = newSize-1;
+ 
+   ValueArray<Posting*> newHash(newSize);
+-  int32_t hashPos, code;
++  int32_t hashPos;
++  uint32_t code;
+   const TCHAR* pos = NULL;
+   const TCHAR* start = NULL;
+   Posting* p0;

Added: head/textproc/clucene/files/patch-src__core__CLucene__index__IndexFileDeleter.cpp
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/textproc/clucene/files/patch-src__core__CLucene__index__IndexFileDeleter.cpp	Wed Jun 25 04:42:15 2014	(r359182)
@@ -0,0 +1,11 @@
+--- src/core/CLucene/index/IndexFileDeleter.cpp.orig	2011-03-16 20:21:07.000000000 -0400
++++ src/core/CLucene/index/IndexFileDeleter.cpp	2014-06-24 19:06:58.000000000 -0400
+@@ -129,7 +129,7 @@
+ 
+ 	  string& fileName = files.at(i);
+ 
+-    if (filter->accept(NULL, fileName.c_str()) && !fileName.compare(IndexFileNames::SEGMENTS_GEN) == 0) {
++    if (filter->accept(NULL, fileName.c_str()) && fileName.compare(IndexFileNames::SEGMENTS_GEN) != 0) {
+ 
+ 	    // Add this file to refCounts with initial count 0:
+ 	    getRefCount(fileName.c_str());

Modified: head/textproc/clucene/files/patch-src__core__CLucene__index__IndexWriter.cpp
==============================================================================
--- head/textproc/clucene/files/patch-src__core__CLucene__index__IndexWriter.cpp	Wed Jun 25 03:47:31 2014	(r359181)
+++ head/textproc/clucene/files/patch-src__core__CLucene__index__IndexWriter.cpp	Wed Jun 25 04:42:15 2014	(r359182)
@@ -1,6 +1,14 @@
 --- src/core/CLucene/index/IndexWriter.cpp.orig	2011-03-16 20:21:07.000000000 -0400
-+++ src/core/CLucene/index/IndexWriter.cpp	2013-03-27 16:56:54.000000000 -0400
-@@ -814,7 +814,7 @@
++++ src/core/CLucene/index/IndexWriter.cpp	2014-06-24 19:10:36.000000000 -0400
+@@ -53,7 +53,6 @@
+ 
+ DEFINE_MUTEX(IndexWriter::MESSAGE_ID_LOCK)
+ int32_t IndexWriter::MESSAGE_ID = 0;
+-const int32_t IndexWriter::MAX_TERM_LENGTH = DocumentsWriter::MAX_TERM_LENGTH;
+ 
+ class IndexWriter::Internal{
+ public:
+@@ -814,7 +813,7 @@
    ensureOpen();
  
    if (maxNumSegments < 1)
@@ -9,3 +17,30 @@
  
    if (infoStream != NULL)
      message("optimize: index now " + segString());
+@@ -1392,7 +1391,7 @@
+     // Check if the doc stores must be separately flushed
+     // because other segments, besides the one we are about
+     // to flush, reference it
+-    if (_flushDocStores && (!flushDocs || !docWriter->getSegment().compare(docWriter->getDocStoreSegment())==0 )) {
++    if (_flushDocStores && (!flushDocs || docWriter->getSegment().compare(docWriter->getDocStoreSegment()) != 0)) {
+       // We must separately flush the doc store
+       if (infoStream != NULL)
+         message("  flush shared docStore segment " + docStoreSegment);
+@@ -1631,7 +1630,7 @@
+         // Load deletes present @ start of merge, for this segment:
+         BitVector previousDeletes(previousInfo->dir, previousInfo->getDelFileName().c_str());
+ 
+-        if (!currentInfo->getDelFileName().compare(previousInfo->getDelFileName())==0 ){
++        if (currentInfo->getDelFileName().compare(previousInfo->getDelFileName()) != 0) {
+           // This means this segment has had new deletes
+           // committed since we started the merge, so we
+           // must merge them:
+@@ -1928,7 +1927,7 @@
+       mergeDocStores = true;
+     else if (lastDocStoreSegment.empty())
+       lastDocStoreSegment = docStoreSegment;
+-    else if (!lastDocStoreSegment.compare(docStoreSegment)==0 )
++    else if (lastDocStoreSegment.compare(docStoreSegment) != 0)
+       mergeDocStores = true;
+ 
+     // Segments' docScoreOffsets must be in-order,

Added: head/textproc/clucene/files/patch-src__core__CLucene__index__IndexWriter.h
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/textproc/clucene/files/patch-src__core__CLucene__index__IndexWriter.h	Wed Jun 25 04:42:15 2014	(r359182)
@@ -0,0 +1,17 @@
+--- src/core/CLucene/index/IndexWriter.h.orig	2011-03-16 20:21:07.000000000 -0400
++++ src/core/CLucene/index/IndexWriter.h	2014-06-24 18:17:57.000000000 -0400
+@@ -384,14 +384,6 @@
+    */
+   static const int32_t DEFAULT_MAX_MERGE_DOCS;
+ 
+-  /**
+-   * Absolute hard maximum length for a term.  If a term
+-   * arrives from the analyzer longer than this length, it
+-   * is skipped and a message is printed to infoStream, if
+-   * set (see {@link #setInfoStream}).
+-   */
+-  static const int32_t MAX_TERM_LENGTH;
+-
+ 
+   /* Determines how often segment indices are merged by addDocument().  With
+    *  smaller values, less RAM is used while indexing, and searches on

Added: head/textproc/clucene/files/patch-src__core__CLucene__index__TermInfosReader.cpp
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/textproc/clucene/files/patch-src__core__CLucene__index__TermInfosReader.cpp	Wed Jun 25 04:42:15 2014	(r359182)
@@ -0,0 +1,11 @@
+--- src/core/CLucene/index/TermInfosReader.cpp.orig	2011-03-16 20:21:07.000000000 -0400
++++ src/core/CLucene/index/TermInfosReader.cpp	2014-06-24 18:19:42.000000000 -0400
+@@ -111,7 +111,7 @@
+ 	      //destroy their elements
+ #ifdef _DEBUG
+          for ( int32_t i=0; i<indexTermsLength;++i ){
+-            indexTerms[i].__cl_refcount--;
++            indexTerms[i].__cl_decref();
+          }
+ #endif
+          //Delete the arrays

Added: head/textproc/clucene/files/patch-src__core__CLucene__queryParser__QueryParser.cpp
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/textproc/clucene/files/patch-src__core__CLucene__queryParser__QueryParser.cpp	Wed Jun 25 04:42:15 2014	(r359182)
@@ -0,0 +1,11 @@
+--- src/core/CLucene/queryParser/QueryParser.cpp.orig	2011-03-16 20:21:07.000000000 -0400
++++ src/core/CLucene/queryParser/QueryParser.cpp	2014-06-24 18:33:06.000000000 -0400
+@@ -79,7 +79,7 @@
+     _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_0[] = {0x180,0x180,0xe00,0xe00,0x1f69f80,0x48000,0x10000,0x1f69000,0x1348000,0x80000,0x80000,0x10000,0x18000000,0x2000000,0x18000000,0x10000,int32_t(0x80000000),0x20000000,int32_t(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};
+ 
+ struct QueryParser::JJCalls {

Added: head/textproc/clucene/files/patch-src__core__CLucene__queryParser__QueryParserTokenManager.cpp
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/textproc/clucene/files/patch-src__core__CLucene__queryParser__QueryParserTokenManager.cpp	Wed Jun 25 04:42:15 2014	(r359182)
@@ -0,0 +1,62 @@
+--- src/core/CLucene/queryParser/QueryParserTokenManager.cpp.orig	2011-03-16 20:21:07.000000000 -0400
++++ src/core/CLucene/queryParser/QueryParserTokenManager.cpp	2014-06-24 19:34:09.000000000 -0400
+@@ -15,9 +15,9 @@
+ 
+ CL_NS_DEF(queryParser)
+ 
+-const int64_t QueryParserTokenManager::jjbitVec2[]={0x0L, 0x0L, _ILONGLONG(0xffffffffffffffff), _ILONGLONG(0xffffffffffffffff)};
++const int64_t QueryParserTokenManager::jjbitVec2[]={0x0L, 0x0L, int64_t(_ILONGLONG(0xffffffffffffffff)), int64_t(_ILONGLONG(0xffffffffffffffff))};
+ const int64_t QueryParserTokenManager::jjbitVec0[] = {
+-	_ILONGLONG(0xfffffffffffffffe), _ILONGLONG(0xffffffffffffffff), _ILONGLONG(0xffffffffffffffff), _ILONGLONG(0xffffffffffffffff)
++	int64_t(_ILONGLONG(0xfffffffffffffffe)), int64_t(_ILONGLONG(0xffffffffffffffff)), int64_t(_ILONGLONG(0xffffffffffffffff)), int64_t(_ILONGLONG(0xffffffffffffffff))
+ };
+ const int32_t QueryParserTokenManager::jjnextStates[]={
+ 		15, 17, 18, 29, 32, 23, 33, 30, 20, 21, 32, 23, 33, 31, 34, 27,
+@@ -544,7 +544,10 @@
+ 			kind = 0x7fffffff;
+ 		}
+ 		++curPos;
+-		if ((i = jjnewStateCnt) == (startsAt = 36 - (jjnewStateCnt = startsAt)))
++		i = jjnewStateCnt;
++		jjnewStateCnt = startsAt;
++		startsAt = 36 - jjnewStateCnt;
++		if (i == startsAt)
+ 			return curPos;
+ 		try { curChar = input_stream->readChar(); }
+ 		catch(CLuceneError& e) {
+@@ -756,7 +759,10 @@
+ 			kind = 0x7fffffff;
+ 		}
+ 		++curPos;
+-		if ((i = jjnewStateCnt) == (startsAt = 7 - (jjnewStateCnt = startsAt)))
++		i = jjnewStateCnt;
++		jjnewStateCnt = startsAt;
++		startsAt = 7 - jjnewStateCnt;
++		if (i == startsAt)
+ 			return curPos;
+ 		try { curChar = input_stream->readChar(); }
+ 		catch(CLuceneError& e) {
+@@ -854,7 +860,10 @@
+ 			kind = 0x7fffffff;
+ 		}
+ 		++curPos;
+-		if ((i = jjnewStateCnt) == (startsAt = 3 - (jjnewStateCnt = startsAt)))
++		i = jjnewStateCnt;
++		jjnewStateCnt = startsAt;
++		startsAt = 3 - jjnewStateCnt;
++		if (i == startsAt)
+ 			return curPos;
+ 		try { curChar = input_stream->readChar(); }
+ 		catch(CLuceneError& e) {
+@@ -1066,7 +1075,10 @@
+ 			kind = 0x7fffffff;
+ 		}
+ 		++curPos;
+-		if ((i = jjnewStateCnt) == (startsAt = 7 - (jjnewStateCnt = startsAt)))
++		i = jjnewStateCnt;
++		jjnewStateCnt = startsAt;
++		startsAt = 7 - jjnewStateCnt;
++		if (i == startsAt)
+ 			return curPos;
+ 		try { curChar = input_stream->readChar(); }
+ 		catch(CLuceneError& e) {

Added: head/textproc/clucene/files/patch-src__core__CLucene__queryParser__legacy__Lexer.cpp
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/textproc/clucene/files/patch-src__core__CLucene__queryParser__legacy__Lexer.cpp	Wed Jun 25 04:42:15 2014	(r359182)
@@ -0,0 +1,11 @@
+--- src/core/CLucene/queryParser/legacy/Lexer.cpp.orig	2011-03-16 20:21:07.000000000 -0400
++++ src/core/CLucene/queryParser/legacy/Lexer.cpp	2014-06-24 18:33:06.000000000 -0400
+@@ -117,7 +117,7 @@
+       if( _istspace(ch)!=0 ) {
+          continue;
+       }
+-      TCHAR buf[2] = {ch,'\0'};
++      TCHAR buf[2] = {TCHAR(ch),'\0'};
+       switch(ch) {
+          case '+':
+             token->set(buf, QueryToken::PLUS);

Added: head/textproc/clucene/files/patch-src__core__CLucene__store__FSDirectory.cpp
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/textproc/clucene/files/patch-src__core__CLucene__store__FSDirectory.cpp	Wed Jun 25 04:42:15 2014	(r359182)
@@ -0,0 +1,14 @@
+--- src/core/CLucene/store/FSDirectory.cpp.orig	2011-03-16 20:21:07.000000000 -0400
++++ src/core/CLucene/store/FSDirectory.cpp	2014-06-24 18:26:54.000000000 -0400
+@@ -219,9 +219,8 @@
+ 		_CLDECDELETE(handle);
+ 
+ 		//printf("handle=%d\n", handle->__cl_refcount);
+-		if ( dounlock ){
+-			mutex->unlock();
+-		}else{
++		mutex->unlock();
++		if ( !dounlock ) {
+ 			delete mutex;
+ 		}
+ 	}

Added: head/textproc/clucene/files/patch-src__core__CLucene__store__IndexInput.cpp
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/textproc/clucene/files/patch-src__core__CLucene__store__IndexInput.cpp	Wed Jun 25 04:42:15 2014	(r359182)
@@ -0,0 +1,13 @@
+--- src/core/CLucene/store/IndexInput.cpp.orig	2011-03-16 20:21:07.000000000 -0400
++++ src/core/CLucene/store/IndexInput.cpp	2014-06-24 18:38:50.000000000 -0400
+@@ -41,8 +41,8 @@
+   }
+ 
+   int64_t IndexInput::readLong() {
+-    int64_t i = ((int64_t)readInt() << 32);
+-    return (i | ((int64_t)readInt() & 0xFFFFFFFFL));
++    uint64_t i = ((uint64_t)readInt() << 32);
++    return (i | ((uint64_t)readInt() & 0xFFFFFFFFL));
+   }
+ 
+   int64_t IndexInput::readVLong() {

Modified: head/textproc/clucene/files/patch-src__core__CLucene__util__VoidMap.h
==============================================================================
--- head/textproc/clucene/files/patch-src__core__CLucene__util__VoidMap.h	Wed Jun 25 03:47:31 2014	(r359181)
+++ head/textproc/clucene/files/patch-src__core__CLucene__util__VoidMap.h	Wed Jun 25 04:42:15 2014	(r359182)
@@ -1,6 +1,20 @@
 --- src/core/CLucene/util/VoidMap.h.orig	2011-03-16 20:21:07.000000000 -0400
-+++ src/core/CLucene/util/VoidMap.h	2013-01-08 17:37:43.000000000 -0500
-@@ -83,7 +83,7 @@
++++ src/core/CLucene/util/VoidMap.h	2014-06-24 18:48:01.000000000 -0400
+@@ -11,8 +11,13 @@
+ #include "CLucene/LuceneThreads.h"
+ 
+ #if defined(_CL_HAVE_TR1_UNORDERED_MAP) && defined(_CL_HAVE_TR1_UNORDERED_SET)
++#if defined(_LIBCPP_VERSION)
++	#include <unordered_map>
++	#include <unordered_set>
++#else
+ 	#include <tr1/unordered_map>
+ 	#include <tr1/unordered_set>
++#endif
+ #elif defined(_CL_HAVE_HASH_MAP) && defined(_CL_HAVE_HASH_SET)
+ 	//hashing is all or nothing!
+ 	#include <hash_map>
+@@ -83,7 +88,7 @@
  	_vt get( _kt k) const {
  		const_iterator itr = base::find(k);
  		if ( itr==base::end() )
@@ -9,7 +23,7 @@
  		else
  			return itr->second;
  	}
-@@ -316,6 +316,7 @@
+@@ -316,6 +321,7 @@
  		if ( _this::dk || _this::dv )
  			_this::remove(k);
  

Copied: head/textproc/clucene/files/patch-src__shared__CLucene__LuceneThreads.h (from r359181, head/textproc/clucene/files/patch-libc++)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/textproc/clucene/files/patch-src__shared__CLucene__LuceneThreads.h	Wed Jun 25 04:42:15 2014	(r359182, copy of r359181, head/textproc/clucene/files/patch-libc++)
@@ -0,0 +1,12 @@
+--- src/shared/CLucene/LuceneThreads.h.orig	2011-03-17 01:21:07.000000000 +0100
++++ src/shared/CLucene/LuceneThreads.h	2013-09-03 18:25:01.380067076 +0200
+@@ -7,6 +7,9 @@
+ #ifndef _LuceneThreads_h
+ #define  _LuceneThreads_h
+ 
++#if defined(_CL_HAVE_PTHREAD)
++#include <pthread.h>
++#endif
+ 
+ CL_NS_DEF(util)
+ class CLuceneThreadIdCompare;

Added: head/textproc/clucene/files/patch-src__shared__cmake__CheckHashmaps.cmake
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/textproc/clucene/files/patch-src__shared__cmake__CheckHashmaps.cmake	Wed Jun 25 04:42:15 2014	(r359182)
@@ -0,0 +1,15 @@
+--- src/shared/cmake/CheckHashmaps.cmake.orig	2011-03-16 20:21:07.000000000 -0400
++++ src/shared/cmake/CheckHashmaps.cmake	2014-06-24 19:20:14.000000000 -0400
+@@ -35,8 +35,12 @@
+ #elif defined(_CL_HAVE_EXT_HASH_MAP)
+ 	#include <ext/hash_map>
+ #elif defined(_CL_HAVE_TR1_UNORDERED_MAP)
++#if defined(_LIBCPP_VERSION)
++	#include <unordered_map>
++#else
+ 	#include <tr1/unordered_map>
+ #endif
++#endif
+ int main() {  
+     ${namespace}::${_CL_HASH_MAP}<int,char> a; 
+     return 0; 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201406250442.s5P4gFvo066129>