Date: Wed, 18 Jan 2017 21:34:42 +0000 (UTC) From: Jan Beich <jbeich@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r431828 - head/comms/telldus-core/files Message-ID: <201701182134.v0ILYgcn050173@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: jbeich Date: Wed Jan 18 21:34:42 2017 New Revision: 431828 URL: https://svnweb.freebsd.org/changeset/ports/431828 Log: 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) Modified: head/comms/telldus-core/files/patch-service-SettingsConfuse.cpp (contents, props changed) Modified: head/comms/telldus-core/files/patch-service-SettingsConfuse.cpp ============================================================================== --- head/comms/telldus-core/files/patch-service-SettingsConfuse.cpp Wed Jan 18 20:35:09 2017 (r431827) +++ head/comms/telldus-core/files/patch-service-SettingsConfuse.cpp Wed Jan 18 21:34:42 2017 (r431828) @@ -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) {
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201701182134.v0ILYgcn050173>