Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 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 | |
| 7 | Clang finds this warning |
| 8 | RssReader.cpp:272:19: error: ordered comparison between pointer and zero ('TiXmlElement *' and 'int') |
| 9 | while (itemNode > 0) |
| 10 | ~~~~~~~~ ^ ~ |
| 11 | RssReader.cpp:276:22: error: ordered comparison between pointer and zero ('TiXmlNode *' and 'int') |
| 12 | while (childNode > 0) |
| 13 | ~~~~~~~~~ ^ ~ |
| 14 | |
| 15 | Signed-off-by: Khem Raj <raj.khem@gmail.com> |
| 16 | --- |
| 17 | xbmc/utils/RssReader.cpp | 4 ++-- |
| 18 | 1 file changed, 2 insertions(+), 2 deletions(-) |
| 19 | |
| 20 | diff --git a/xbmc/utils/RssReader.cpp b/xbmc/utils/RssReader.cpp |
| 21 | index 9186f56..2494dc8 100644 |
| 22 | --- a/xbmc/utils/RssReader.cpp |
| 23 | +++ b/xbmc/utils/RssReader.cpp |
| 24 | @@ -269,11 +269,11 @@ void CRssReader::GetNewsItems(TiXmlElement* channelXmlNode, int iFeed) |
| 25 | if (m_tagSet.empty()) |
| 26 | AddTag("title"); |
| 27 | |
| 28 | - while (itemNode > 0) |
| 29 | + while (itemNode != NULL) |
| 30 | { |
| 31 | TiXmlNode* childNode = itemNode->FirstChild(); |
| 32 | mTagElements.clear(); |
| 33 | - while (childNode > 0) |
| 34 | + while (childNode != NULL) |
| 35 | { |
| 36 | std::string strName = childNode->ValueStr(); |
| 37 | |
| 38 | -- |
| 39 | 2.10.2 |
| 40 | |