diff options
author | jbeich <jbeich@FreeBSD.org> | 2017-01-19 05:34:42 +0800 |
---|---|---|
committer | jbeich <jbeich@FreeBSD.org> | 2017-01-19 05:34:42 +0800 |
commit | c00ab2aff78d6969a20c2f5097cc406f502b92f1 (patch) | |
tree | b1d5d1f2e1112854f9fe1c49cebbff562b1346a6 /comms | |
parent | 4780324541e4fc8df12e07e1d5bde9efa2050e0d (diff) | |
download | freebsd-ports-gnome-c00ab2aff78d6969a20c2f5097cc406f502b92f1.tar.gz freebsd-ports-gnome-c00ab2aff78d6969a20c2f5097cc406f502b92f1.tar.zst freebsd-ports-gnome-c00ab2aff78d6969a20c2f5097cc406f502b92f1.zip |
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)
Diffstat (limited to 'comms')
-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) { |