open-zwave
open-zwave copied to clipboard
Compilation errors : overrides a member function but is not marked 'override'
Since few weeks, I am not able to compile OZW on FreeBSD 13.0 with Clang 11.
I have several fatal errors :
In file included from /usr/home/kiwi/git/freebsd-ports/comms/openzwave-devel/work/open-zwave-f150a985/cpp/src/command_classes/CommandClasses.cpp:73:
/usr/home/kiwi/git/freebsd-ports/comms/openzwave-devel/work/open-zwave-f150a985/cpp/src/command_classes/Supervision.h:82:12: error: 'CreateSupervisionSession' overrides a member function but is not marked 'override' [-Werror,-Winconsistent-missing-override]
uint8 CreateSupervisionSession(uint8 _command_class_id, uint8 _index);
^
/usr/home/kiwi/git/freebsd-ports/comms/openzwave-devel/work/open-zwave-f150a985/cpp/src/command_classes/CommandClass.h:152:20: note: overridden virtual function is here
virtual uint8 CreateSupervisionSession(uint8 _command_class_id, uint8 _index) {
^
In file included from /usr/home/kiwi/git/freebsd-ports/comms/openzwave-devel/work/open-zwave-f150a985/cpp/src/command_classes/CommandClasses.cpp:73:
/usr/home/kiwi/git/freebsd-ports/comms/openzwave-devel/work/open-zwave-f150a985/cpp/src/command_classes/Supervision.h:87:13: error: 'GetSupervisionIndex' overrides a member function but is not marked 'override' [-Werror,-Winconsistent-missing-override]
uint32 GetSupervisionIndex(uint8 _session_id);
^
/usr/home/kiwi/git/freebsd-ports/comms/openzwave-devel/work/open-zwave-f150a985/cpp/src/command_classes/CommandClass.h:155:21: note: overridden virtual function is here
virtual uint32 GetSupervisionIndex(uint8 _session_id) {
^
Building src/command_classes/Meter.cpp
In file included from /usr/home/kiwi/git/freebsd-ports/comms/openzwave-devel/work/open-zwave-f150a985/cpp/src/command_classes/CommandClasses.cpp:75:
/usr/home/kiwi/git/freebsd-ports/comms/openzwave-devel/work/open-zwave-f150a985/cpp/src/command_classes/SwitchBinary.h:83:19: error: 'SupervisionSessionSuccess' overrides a member function but is not marked 'override' [-Werror,-Winconsistent-missing-override]
virtual void SupervisionSessionSuccess(uint8 _session_id, uint32 const _instance);
^
/usr/home/kiwi/git/freebsd-ports/comms/openzwave-devel/work/open-zwave-f150a985/cpp/src/command_classes/CommandClass.h:158:19: note: overridden virtual function is here
virtual void SupervisionSessionSuccess(uint8 _session_id, uint32 const _instance) {};
^
In file included from /usr/home/kiwi/git/freebsd-ports/comms/openzwave-devel/work/open-zwave-f150a985/cpp/src/command_classes/CommandClasses.cpp:76:
/usr/home/kiwi/git/freebsd-ports/comms/openzwave-devel/work/open-zwave-f150a985/cpp/src/command_classes/SwitchMultilevel.h:82:19: error: 'SupervisionSessionSuccess' overrides a member function but is not marked 'override' [-Werror,-Winconsistent-missing-override]
virtual void SupervisionSessionSuccess(uint8 _session_id, uint32 const _instance);
^
/usr/home/kiwi/git/freebsd-ports/comms/openzwave-devel/work/open-zwave-f150a985/cpp/src/command_classes/CommandClass.h:158:19: note: overridden virtual function is here
virtual void SupervisionSessionSuccess(uint8 _session_id, uint32 const _instance) {};
^
In file included from /usr/home/kiwi/git/freebsd-ports/comms/openzwave-devel/work/open-zwave-f150a985/cpp/src/command_classes/CommandClasses.cpp:82:
/usr/home/kiwi/git/freebsd-ports/comms/openzwave-devel/work/open-zwave-f150a985/cpp/src/command_classes/ThermostatMode.h:85:19: error: 'SupervisionSessionSuccess' overrides a member function but is not marked 'override' [-Werror,-Winconsistent-missing-override]
virtual void SupervisionSessionSuccess(uint8 _session_id, uint32 const _instance);
^
/usr/home/kiwi/git/freebsd-ports/comms/openzwave-devel/work/open-zwave-f150a985/cpp/src/command_classes/CommandClass.h:158:19: note: overridden virtual function is here
virtual void SupervisionSessionSuccess(uint8 _session_id, uint32 const _instance) {};
^
In file included from /usr/home/kiwi/git/freebsd-ports/comms/openzwave-devel/work/open-zwave-f150a985/cpp/src/command_classes/CommandClasses.cpp:84:
/usr/home/kiwi/git/freebsd-ports/comms/openzwave-devel/work/open-zwave-f150a985/cpp/src/command_classes/ThermostatSetpoint.h:83:19: error: 'SupervisionSessionSuccess' overrides a member function but is not marked 'override' [-Werror,-Winconsistent-missing-override]
virtual void SupervisionSessionSuccess(uint8 _session_id, uint32 const _instance);
^
/usr/home/kiwi/git/freebsd-ports/comms/openzwave-devel/work/open-zwave-f150a985/cpp/src/command_classes/CommandClass.h:158:19: note: overridden virtual function is here
virtual void SupervisionSessionSuccess(uint8 _session_id, uint32 const _instance) {};
^
Since I am not a C++ guru, I have no idea on how to fix that.
Any hint ?
$ c++ -v
FreeBSD clang version 11.0.1 ([email protected]:llvm/llvm-project.git llvmorg-11.0.1-0-g43ff75f2c3fe)
Target: x86_64-unknown-freebsd13.0
Thread model: posix
InstalledDir: /usr/bin
Regards, Xavier
edit file open-zwave/Makefile
add line
CPPFLAGS = -Wno-inconsistent-missing-override
between
PREFIX ?= /usr/local export PREFIX
CPPFLAGS = -Wno-inconsistent-missing-override
UNAME := $(shell uname) export UNAME
and save