aboutsummaryrefslogtreecommitdiffstats
path: root/meta-multimedia/recipes-mediacenter/kodi/kodi-17/0010-RssReader-Fix-compiler-warning-comparing-pointer-to-.patch
blob: e34a5b71e44305f24cae402cda5be959a90be7eb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
From 55233024648b5673dbf223586968e71cc4c70711 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Wed, 16 Nov 2016 18:49:36 -0800
Subject: [PATCH 10/10] RssReader: Fix compiler warning comparing pointer to
 zero

Clang finds this warning
RssReader.cpp:272:19: error: ordered comparison between pointer and zero ('TiXmlElement *' and 'int')
  while (itemNode > 0)
         ~~~~~~~~ ^ ~
RssReader.cpp:276:22: error: ordered comparison between pointer and zero ('TiXmlNode *' and 'int')
    while (childNode > 0)
           ~~~~~~~~~ ^ ~

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 xbmc/utils/RssReader.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/xbmc/utils/RssReader.cpp b/xbmc/utils/RssReader.cpp
index 9186f56..2494dc8 100644
--- a/xbmc/utils/RssReader.cpp
+++ b/xbmc/utils/RssReader.cpp
@@ -269,11 +269,11 @@ void CRssReader::GetNewsItems(TiXmlElement* channelXmlNode, int iFeed)
   if (m_tagSet.empty())
     AddTag("title");
 
-  while (itemNode > 0)
+  while (itemNode != NULL)
   {
     TiXmlNode* childNode = itemNode->FirstChild();
     mTagElements.clear();
-    while (childNode > 0)
+    while (childNode != NULL)
     {
       std::string strName = childNode->ValueStr();
 
-- 
2.10.2