Samsung / cynara

simple privilege access control service
Apache License 2.0
25 stars 20 forks source link

Compilation fais with clang++ #7

Closed rafal-krypa closed 9 years ago

rafal-krypa commented 10 years ago

Clang++ (tried version 3.5) finds and interesting problem with the code. Originally it's a warning, but it's treated as error due to -Werror:

Scanning dependencies of target cynara-commons
[  3%] Building CXX object src/common/CMakeFiles/cynara-commons.dir/protocol/ProtocolClient.cpp.o
In file included from /data/rafal/src/cynara/src/common/protocol/ProtocolClient.cpp:36:
/data/rafal/src/cynara/src/common/protocol/ProtocolClient.h:44:18: error: 'Cynara::ProtocolClient::execute' hides overloaded virtual function
      [-Werror,-Woverloaded-virtual]
    virtual void execute(RequestContextPtr context, CheckRequestPtr request);
                 ^
/data/rafal/src/cynara/src/common/response/ResponseTaker.h:36:18: note: hidden overloaded virtual function 'Cynara::ResponseTaker::execute'
      declared here: type mismatch at 2nd parameter ('shared_ptr<class Cynara::CheckResponse>' vs 'shared_ptr<class Cynara::CheckRequest>')
    virtual void execute(RequestContextPtr context, CheckResponsePtr response);
                 ^
1 error generated.
make[2]: *** [src/common/CMakeFiles/cynara-commons.dir/protocol/ProtocolClient.cpp.o] Error 1
make[1]: *** [src/common/CMakeFiles/cynara-commons.dir/all] Error 2
make: *** [all] Error 2
zos commented 9 years ago

This might be the cause : http://stackoverflow.com/questions/18515183/c-overloaded-virtual-function-warning-by-clang/18515300#18515300

lukaszwojciechowski commented 9 years ago

Problem has been solved