--- Begin Message ---
Source: ncbi-blast+
Version: 2.2.26-2
Severity: important
Tags: patch
ncbi-blast+ fails to build with GCC 4.7, which is stricter than 4.6 in
some ways. The attached patch addresses the errors, along with some
new warnings in widely included headers.
Index: b/c++/include/connect/ncbi_conn_stream.hpp
===================================================================
--- a/c++/include/connect/ncbi_conn_stream.hpp 2012-01-20 19:27:04.000000000 -0500
+++ b/c++/include/connect/ncbi_conn_stream.hpp 2012-04-13 20:01:29.000000000 -0400
@@ -259,7 +259,7 @@
class CConn_IOStreamSetReadTimeout : protected CConn_IOStreamSetTimeout
{
public:
- CConn_IOStreamSetTimeout::GetTimeout;
+ using CConn_IOStreamSetTimeout::GetTimeout;
protected:
CConn_IOStreamSetReadTimeout(const STimeout* timeout)
@@ -289,7 +289,7 @@
class CConn_IOStreamSetWriteTimeout : protected CConn_IOStreamSetTimeout
{
public:
- CConn_IOStreamSetTimeout::GetTimeout;
+ using CConn_IOStreamSetTimeout::GetTimeout;
protected:
CConn_IOStreamSetWriteTimeout(const STimeout* timeout)
Index: b/c++/include/corelib/ncbiexpt.hpp
===================================================================
--- a/c++/include/corelib/ncbiexpt.hpp 2011-11-18 14:20:24.000000000 -0500
+++ b/c++/include/corelib/ncbiexpt.hpp 2012-04-13 18:38:05.000000000 -0400
@@ -852,7 +852,7 @@
exception_class(const exception_class& other) \
: base_class(other) \
{ \
- x_Assign(other); \
+ this->x_Assign(other); \
} \
public: \
virtual ~exception_class(void) throw() {} \
@@ -1172,7 +1172,7 @@
: TBase( other)
{
m_Errno = other.m_Errno;
- x_Assign(other);
+ this->x_Assign(other);
}
/// Destructor.
Index: b/c++/include/corelib/ncbimisc.hpp
===================================================================
--- a/c++/include/corelib/ncbimisc.hpp 2012-02-02 16:13:59.000000000 -0500
+++ b/c++/include/corelib/ncbimisc.hpp 2012-04-13 18:39:43.000000000 -0400
@@ -39,6 +39,7 @@
#ifdef HAVE_SYS_TYPES_H
# include <sys/types.h>
#endif
+#include <cstdlib>
#ifdef NCBI_COMPILER_ICC
// Preemptively pull in <cctype>, which breaks if we've already
// repointed is* at NCBI_is*.
Index: b/c++/include/corelib/ncbistl.hpp
===================================================================
--- a/c++/include/corelib/ncbistl.hpp 2011-09-09 09:04:25.000000000 -0400
+++ b/c++/include/corelib/ncbistl.hpp 2012-04-13 18:46:25.000000000 -0400
@@ -37,6 +37,7 @@
#include <common/ncbi_export.h>
+#include <algorithm>
// Get rid of some warnings in MSVC++
#if (_MSC_VER >= 1200)
Index: b/c++/include/corelib/ncbistr.hpp
===================================================================
--- a/c++/include/corelib/ncbistr.hpp 2012-04-13 18:36:39.000000000 -0400
+++ b/c++/include/corelib/ncbistr.hpp 2012-04-13 18:36:52.000000000 -0400
@@ -3039,7 +3039,7 @@
: TBase(other)
{
m_Pos = other.m_Pos;
- x_Assign(other);
+ this->x_Assign(other);
}
/// Destructor.
Index: b/c++/include/serial/impl/stltypes.hpp
===================================================================
--- a/c++/include/serial/impl/stltypes.hpp 2007-11-08 09:12:17.000000000 -0500
+++ b/c++/include/serial/impl/stltypes.hpp 2012-04-13 19:49:56.000000000 -0400
@@ -412,6 +412,7 @@
typedef StlIterator TStlIterator;
typedef TypeInfoIterator TTypeInfoIterator;
typedef typename TTypeInfoIterator::TObjectPtr TObjectPtr;
+ typedef CStlClassInfoFunctions<Container> CParent;
static TStlIterator& It(TTypeInfoIterator& iter)
{
@@ -437,7 +438,8 @@
}
static bool InitIterator(TTypeInfoIterator& iter)
{
- TStlIterator stl_iter = Get(iter.GetContainerPtr()).begin();
+ TStlIterator stl_iter
+ = CParent::Get(iter.GetContainerPtr()).begin();
if ( sizeof(TStlIterator) <= sizeof(iter.m_IteratorData) ) {
void* data = &iter.m_IteratorData;
new (data) TStlIterator(stl_iter);
@@ -445,7 +447,7 @@
else {
iter.m_IteratorData = new TStlIterator(stl_iter);
}
- return stl_iter != Get(iter.GetContainerPtr()).end();
+ return stl_iter != CParent::Get(iter.GetContainerPtr()).end();
}
static void ReleaseIterator(TTypeInfoIterator& iter)
{
@@ -466,7 +468,7 @@
static bool NextElement(TTypeInfoIterator& iter)
{
- return ++It(iter) != Get(iter.GetContainerPtr()).end();
+ return ++It(iter) != CParent::Get(iter.GetContainerPtr()).end();
}
static TObjectPtr GetElementPtr(const TTypeInfoIterator& iter)
{
@@ -503,7 +505,7 @@
static bool EraseElement(TTypeInfoIterator& iter)
{
- TStlIterator& it = It(iter);
+ TStlIterator& it = CParent::It(iter);
Container* c = static_cast<Container*>(iter.GetContainerPtr());
it = c->erase(it);
return it != c->end();
@@ -511,7 +513,7 @@
static void EraseAllElements(TTypeInfoIterator& iter)
{
Container* c = static_cast<Container*>(iter.GetContainerPtr());
- c->erase(It(iter), c->end());
+ c->erase(CParent::It(iter), c->end());
}
static void SetIteratorFunctions(CStlOneArgTemplate* info)
@@ -542,7 +544,7 @@
}
static bool EraseElement(TTypeInfoIterator& iter)
{
- TStlIterator& it = It(iter);
+ TStlIterator& it = CParent::It(iter);
Container* c = static_cast<Container*>(iter.GetContainerPtr());
TStlIterator erase = it++;
c->erase(erase);
@@ -551,7 +553,7 @@
static void EraseAllElements(TTypeInfoIterator& iter)
{
Container* c = static_cast<Container*>(iter.GetContainerPtr());
- c->erase(It(iter), c->end());
+ c->erase(CParent::It(iter), c->end());
}
static void SetIteratorFunctions(CStlOneArgTemplate* info)
Index: b/c++/include/serial/iterator.hpp
===================================================================
--- a/c++/include/serial/iterator.hpp 2011-11-15 13:47:57.000000000 -0500
+++ b/c++/include/serial/iterator.hpp 2012-04-13 19:55:26.000000000 -0400
@@ -520,13 +520,13 @@
CTypeIteratorBase(TTypeInfo needType, const TBeginInfo& beginInfo)
: m_NeedType(needType)
{
- Init(beginInfo);
+ this->Init(beginInfo);
}
CTypeIteratorBase(TTypeInfo needType, const TBeginInfo& beginInfo,
const string& filter)
: m_NeedType(needType)
{
- Init(beginInfo, filter);
+ this->Init(beginInfo, filter);
}
virtual bool CanSelect(const CConstObjectInfo& object)
Index: b/c++/include/util/bitset/bmfunc.h
===================================================================
--- a/c++/include/util/bitset/bmfunc.h 2010-04-22 16:35:26.000000000 -0400
+++ b/c++/include/util/bitset/bmfunc.h 2012-04-13 19:36:46.000000000 -0400
@@ -39,6 +39,13 @@
namespace bm
{
+bm::id_t bit_block_any_range(const bm::word_t* block,
+ bm::word_t left,
+ bm::word_t right);
+
+bm::id_t bit_block_calc_count_range(const bm::word_t* block,
+ bm::word_t left,
+ bm::word_t right);
/*!
@brief Structure with statistical information about bitset's memory
Index: b/c++/include/util/bitset/bmserial.h
===================================================================
--- a/c++/include/util/bitset/bmserial.h 2010-04-22 16:35:26.000000000 -0400
+++ b/c++/include/util/bitset/bmserial.h 2012-04-13 19:44:04.000000000 -0400
@@ -1381,7 +1381,7 @@
case set_block_arrgap:
case set_block_arrgap_egamma:
{
- unsigned arr_len = read_id_list(dec, btype, this->id_array_);
+ unsigned arr_len = this->read_id_list(dec, btype, this->id_array_);
gap_len = gap_set_array(gap_temp_block_, this->id_array_, arr_len);
break;
}
@@ -1390,7 +1390,7 @@
(sizeof(gap_word_t) == 2 ? dec.get_16() : dec.get_32());
case set_block_arrgap_egamma_inv:
case set_block_arrgap_inv:
- gap_len = read_gap_block(dec, btype, gap_temp_block_, gap_head);
+ gap_len = this->read_gap_block(dec, btype, gap_temp_block_, gap_head);
break;
default:
BM_ASSERT(0);
Index: b/c++/include/util/linkedset.hpp
===================================================================
--- a/c++/include/util/linkedset.hpp 2007-05-04 13:18:18.000000000 -0400
+++ b/c++/include/util/linkedset.hpp 2012-04-13 19:33:29.000000000 -0400
@@ -268,10 +268,10 @@
pair<iterator, bool> ins = m_Container.insert(value);
if ( ins.second ) {
if ( ins.first == begin() )
- insertToStart(*ins.first);
+ this->insertToStart(*ins.first);
else {
iterator prev = ins.first;
- insertAfter(*--prev, *ins.first);
+ this->insertAfter(*--prev, *ins.first);
}
}
return ins;
@@ -280,10 +280,10 @@
void erase(iterator iter)
{
if ( iter == begin() )
- removeFromStart(*iter);
+ this->removeFromStart(*iter);
else {
iterator prev = iter;
- removeAfter(*--prev, *iter);
+ this->removeAfter(*--prev, *iter);
}
m_Container.erase(iter);
}
@@ -422,10 +422,10 @@
{
iterator iter = m_Container.insert(value);
if ( iter == begin() )
- insertToStart(get(iter));
+ this->insertToStart(get(iter));
else {
iterator prev = iter;
- insertAfter(get(--prev), get(iter));
+ this->insertAfter(get(--prev), get(iter));
}
return iter;
}
@@ -433,10 +433,10 @@
void erase(iterator iter)
{
if ( iter == begin() )
- removeFromStart(get(iter));
+ this->removeFromStart(get(iter));
else {
iterator prev = iter;
- removeAfter(get(--prev), get(iter));
+ this->removeAfter(get(--prev), get(iter));
}
m_Container.erase(iter);
}
Index: b/c++/include/util/rangemap.hpp
===================================================================
--- a/c++/include/util/rangemap.hpp 2007-05-04 13:18:18.000000000 -0400
+++ b/c++/include/util/rangemap.hpp 2012-04-13 19:54:16.000000000 -0400
@@ -578,7 +578,7 @@
// get level
// insert element
- TSelectMapI selectIter = insertLevel(selectKey);
+ TSelectMapI selectIter = this->insertLevel(selectKey);
pair<TLevelMapI, bool> levelIns = selectIter->second.insert(value);
pair<iterator, bool> ret;
@@ -640,7 +640,7 @@
// insert element
iterator ret;
ret.m_Range = range_type::GetWhole();
- ret.m_SelectIter = insertLevel(selectKey);
+ ret.m_SelectIter = this->insertLevel(selectKey);
ret.m_SelectIterEnd = this->m_SelectMap.end();
ret.m_LevelIter = ret.m_SelectIter->second.insert(value);
return ret;
Index: b/c++/src/serial/stdtypes.cpp
===================================================================
--- a/c++/src/serial/stdtypes.cpp 2011-12-05 14:07:11.000000000 -0500
+++ b/c++/src/serial/stdtypes.cpp 2012-04-13 19:39:29.000000000 -0400
@@ -720,7 +720,7 @@
if ( IsSigned() ) {
// signed -> unsigned
// check for negative value
- if ( IsNegative(value) )
+ if ( CParent::IsNegative(value) )
ThrowIntegerOverflow();
}
if ( sizeof(value) > sizeof(result) ) {
@@ -751,7 +751,7 @@
// unsigned -> signed
if ( sizeof(value) == sizeof(result) ) {
// same size - check for sign change only
- if ( IsNegative(result) )
+ if ( CParent::IsNegative(result) )
ThrowIntegerOverflow();
}
}
@@ -786,7 +786,7 @@
if ( IsSigned() ) {
// signed -> unsigned
// check for negative value
- if ( IsNegative(value) )
+ if ( CParent::IsNegative(value) )
ThrowIntegerOverflow();
}
if ( sizeof(value) > sizeof(result) ) {
@@ -817,7 +817,7 @@
// unsigned -> signed
if ( sizeof(value) == sizeof(result) ) {
// same size - check for sign change only
- if ( IsNegative(result) )
+ if ( CParent::IsNegative(result) )
ThrowIntegerOverflow();
}
}
--- End Message ---