diff options
author | Jan Beich <jbeich@FreeBSD.org> | 2017-01-18 21:34:42 +0000 |
---|---|---|
committer | Jan Beich <jbeich@FreeBSD.org> | 2017-01-18 21:34:42 +0000 |
commit | 1b36bdb11d5d835c2d5a3ea004294588df63c1e1 (patch) | |
tree | b1d5d1f2e1112854f9fe1c49cebbff562b1346a6 | |
parent | NSQ is a realtime distributed messaging platform designed to operate at scale, (diff) |
comms/telldus-core: unbreak with clang 4.0
service/SettingsConfuse.cpp:47:13: error: ordered comparison between pointer and zero ('cfg_t *' and 'int')
if (d->cfg > 0) {
~~~~~~ ^ ~
service/SettingsConfuse.cpp:50:17: error: ordered comparison between pointer and zero ('cfg_t *' and 'int')
if (d->var_cfg > 0) {
~~~~~~~~~~ ^ ~
service/SettingsConfuse.cpp:61:13: error: ordered comparison between pointer and zero ('cfg_t *' and 'int')
if (d->cfg > 0) {
~~~~~~ ^ ~
service/SettingsConfuse.cpp:73:13: error: ordered comparison between pointer and zero ('cfg_t *' and 'int')
if (d->cfg > 0) {
~~~~~~ ^ ~
PR: 216052
Submitted by: Johan Ström (maintainer)
Notes
Notes:
svn path=/head/; revision=431828
-rw-r--r-- | comms/telldus-core/files/patch-service-SettingsConfuse.cpp | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/comms/telldus-core/files/patch-service-SettingsConfuse.cpp b/comms/telldus-core/files/patch-service-SettingsConfuse.cpp index 67b148107333..b51e9bf0f63c 100644 --- a/comms/telldus-core/files/patch-service-SettingsConfuse.cpp +++ b/comms/telldus-core/files/patch-service-SettingsConfuse.cpp @@ -9,3 +9,34 @@ cfg_t *cfg; cfg_t *var_cfg; }; +@@ -42,10 +44,10 @@ + */ + Settings::~Settings(void) { + TelldusCore::MutexLocker locker(&mutex); +- if (d->cfg > 0) { ++ if (d->cfg != 0) { + cfg_free(d->cfg); + } +- if (d->var_cfg > 0) { ++ if (d->var_cfg != 0) { + cfg_free(d->var_cfg); + } + delete d; +@@ -56,7 +58,7 @@ + */ + std::wstring Settings::getSetting(const std::wstring &strName) const { + TelldusCore::MutexLocker locker(&mutex); +- if (d->cfg > 0) { ++ if (d->cfg != 0) { + std::string setting(cfg_getstr(d->cfg, TelldusCore::wideToString(strName).c_str())); + return TelldusCore::charToWstring(setting.c_str()); + } +@@ -68,7 +70,7 @@ + */ + int Settings::getNumberOfNodes(Node node) const { + TelldusCore::MutexLocker locker(&mutex); +- if (d->cfg > 0) { ++ if (d->cfg != 0) { + if (node == Device) { + return cfg_size(d->cfg, "device"); + } else if (node == Controller) { |