File Fix-build-with-GCC7.patch of Package xtandem

Fixes:
error: ISO C++ forbids comparison between pointer and integer [-fpermissive]

diff --git a/src/loadmspectrum.cpp b/src/loadmspectrum.cpp
index fecdc19..8d2c0d8 100644
--- a/src/loadmspectrum.cpp
+++ b/src/loadmspectrum.cpp
@@ -693,7 +693,7 @@ bool loadpkl::get(mspectrum &_m)
 				while(*pValue != '\0' && !isspace(*pValue))	{
 					pValue++;
 				}
-				if(pValue != '\0' && strlen(pValue) > 2)	{
+				if(pValue != nullptr && strlen(pValue) > 2)	{
 					specCurrent.m_strDescription = pValue;
 				}
 				specCurrent.m_vMI.push_back(miCurrent);
@@ -884,7 +884,7 @@ bool loaddta::get(mspectrum &_m)
 				while(*pValue != '\0' && !isspace(*pValue))	{
 					pValue++;
 				}
-				if(pValue != '\0' && strlen(pValue) > 2)	{
+				if(pValue != nullptr && strlen(pValue) > 2)	{
 					specCurrent.m_strDescription = pValue;
 				}
 				bFirst = false;
diff --git a/src/saxhandler.cpp b/src/saxhandler.cpp
index 16a92e9..2f30e11 100644
--- a/src/saxhandler.cpp
+++ b/src/saxhandler.cpp
@@ -316,7 +316,7 @@ void SAXSpectraHandler::pushPeaks(bool bM /*= true*/, bool bI /*= true*/, bool d
 			while(*pValue != '\0' && a < m_peaksCount)	{
 				while(*pValue != '\0' && isspace(*pValue))
 					pValue++;
-				if(pValue == '\0')
+				if(pValue == nullptr)
 					break;
 				m_vfM.push_back((float)atof(pValue));
 				while(*pValue != '\0' && !isspace(*pValue))
@@ -328,7 +328,7 @@ void SAXSpectraHandler::pushPeaks(bool bM /*= true*/, bool bI /*= true*/, bool d
 			while(*pValue != '\0' && a < m_peaksCount)	{
 				while(*pValue != '\0' && isspace(*pValue))
 					pValue++;
-				if(pValue == '\0')
+				if(pValue == nullptr)
 					break;
 				m_vfI.push_back((float)atof(pValue));
 				while(*pValue != '\0' && !isspace(*pValue))
-- 
2.23.0

openSUSE Build Service is sponsored by