0010-RssReader-Fix-compiler-warning-comparing-pointer-to-.patch 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. From 55233024648b5673dbf223586968e71cc4c70711 Mon Sep 17 00:00:00 2001
  2. From: Khem Raj <raj.khem@gmail.com>
  3. Date: Wed, 16 Nov 2016 18:49:36 -0800
  4. Subject: [PATCH 10/10] RssReader: Fix compiler warning comparing pointer to
  5. zero
  6. Clang finds this warning
  7. RssReader.cpp:272:19: error: ordered comparison between pointer and zero ('TiXmlElement *' and 'int')
  8. while (itemNode > 0)
  9. ~~~~~~~~ ^ ~
  10. RssReader.cpp:276:22: error: ordered comparison between pointer and zero ('TiXmlNode *' and 'int')
  11. while (childNode > 0)
  12. ~~~~~~~~~ ^ ~
  13. Signed-off-by: Khem Raj <raj.khem@gmail.com>
  14. ---
  15. xbmc/utils/RssReader.cpp | 4 ++--
  16. 1 file changed, 2 insertions(+), 2 deletions(-)
  17. diff --git a/xbmc/utils/RssReader.cpp b/xbmc/utils/RssReader.cpp
  18. index 9186f56..2494dc8 100644
  19. --- a/xbmc/utils/RssReader.cpp
  20. +++ b/xbmc/utils/RssReader.cpp
  21. @@ -269,11 +269,11 @@ void CRssReader::GetNewsItems(TiXmlElement* channelXmlNode, int iFeed)
  22. if (m_tagSet.empty())
  23. AddTag("title");
  24. - while (itemNode > 0)
  25. + while (itemNode != NULL)
  26. {
  27. TiXmlNode* childNode = itemNode->FirstChild();
  28. mTagElements.clear();
  29. - while (childNode > 0)
  30. + while (childNode != NULL)
  31. {
  32. std::string strName = childNode->ValueStr();
  33. --
  34. 2.10.2