提交 3c1d7e61 编写于 作者: G Gabriel Rauter

dbus: remove private unused field type_

This commit removes the private unused field type_ from anbox::dbus::Bus
and promotes -Wunused-private-field back to error level on clang.
上级 44cfc363
...@@ -25,7 +25,6 @@ set(EXTRA_C_WARNINGS "-Wcast-align -Wcast-qual -Wformat -Wredundant-decls -Wswit ...@@ -25,7 +25,6 @@ set(EXTRA_C_WARNINGS "-Wcast-align -Wcast-qual -Wformat -Wredundant-decls -Wswit
set(EXTRA_CXX_WARNINGS "-Wnon-virtual-dtor -Wold-style-cast") set(EXTRA_CXX_WARNINGS "-Wnon-virtual-dtor -Wold-style-cast")
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
set(EXTRA_CXX_WARNINGS "${EXTRA_CXX_WARNINGS} -Wno-error=unused-private-field")
set(EXTRA_CXX_WARNINGS "${EXTRA_CXX_WARNINGS} -Wno-error=unused-const-variable") set(EXTRA_CXX_WARNINGS "${EXTRA_CXX_WARNINGS} -Wno-error=unused-const-variable")
set(EXTRA_CXX_WARNINGS "${EXTRA_CXX_WARNINGS} -Wno-error=unused-lambda-capture") set(EXTRA_CXX_WARNINGS "${EXTRA_CXX_WARNINGS} -Wno-error=unused-lambda-capture")
endif() endif()
......
...@@ -20,9 +20,7 @@ ...@@ -20,9 +20,7 @@
namespace anbox { namespace anbox {
namespace dbus { namespace dbus {
Bus::Bus(Type type) : Bus::Bus(Type type) {
type_{type} {
int ret = 0; int ret = 0;
switch (type) { switch (type) {
case Type::Session: case Type::Session:
......
...@@ -48,7 +48,6 @@ class Bus : public DoNotCopyOrMove { ...@@ -48,7 +48,6 @@ class Bus : public DoNotCopyOrMove {
private: private:
void worker_main(); void worker_main();
Type type_;
sd_bus *bus_ = nullptr; sd_bus *bus_ = nullptr;
std::thread worker_thread_; std::thread worker_thread_;
std::atomic_bool running_{false}; std::atomic_bool running_{false};
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册