Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compilation errors : overrides a member function but is not marked 'override' #2621

Open
xbeaudouin opened this issue Dec 15, 2021 · 1 comment

Comments

@xbeaudouin
Copy link

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

@SergiiSenchurov
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants