未验证 提交 e6bd4370 编写于 作者: S Simon Fels 提交者: GitHub

Merge pull request #888 from raetiacorvus/fix-clang-build

Fix clang build errors
......@@ -5,6 +5,10 @@ project(CpuFeatures VERSION 0.1.0)
# ANBOX allow to build in our more strict build environment
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-error=switch-default -Wno-error=unused-parameter -Wno-error=overflow")
if("${CMAKE_C_COMPILER_ID}" STREQUAL "Clang")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-error=cast-align")
endif()
# Default Build Type to be Release
if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE "Release" CACHE STRING
......
......@@ -44,7 +44,7 @@ anbox::cmds::CheckFeatures::CheckFeatures()
cli::Name{"check-features"}, cli::Usage{"check-features"},
cli::Description{"Check that the host system supports all necessary features"}} {
action([this](const cli::Command::Context&) {
action([](const cli::Command::Context&) {
#if defined(CPU_FEATURES_ARCH_X86)
const auto info = cpu_features::GetX86Info();
std::vector<std::string> missing_features;
......
......@@ -20,9 +20,7 @@
namespace anbox {
namespace dbus {
Bus::Bus(Type type) :
type_{type} {
Bus::Bus(Type type) {
int ret = 0;
switch (type) {
case Type::Session:
......
......@@ -48,7 +48,6 @@ class Bus : public DoNotCopyOrMove {
private:
void worker_main();
Type type_;
sd_bus *bus_ = nullptr;
std::thread worker_thread_;
std::atomic_bool running_{false};
......
......@@ -114,7 +114,12 @@ void ApplicationManager::launch(const android::Intent &intent,
if (r < 0)
throw std::runtime_error("Failed to construct DBus message");
#pragma GCC diagnostic push
#pragma GCC diagnostic warning "-Wpragmas"
#pragma GCC diagnostic warning "-Wc99-extensions"
sd_bus_error error = SD_BUS_ERROR_NULL;
#pragma GCC diagnostic pop
r = sd_bus_call(bus_->raw(), m, 0, &error, nullptr);
if (r < 0) {
const auto msg = utils::string_format("%s", error.message);
......
......@@ -30,7 +30,6 @@ GLESv1Dispatch s_gles1;
namespace {
constexpr const char *default_egl_lib{"libEGL.so.1"};
constexpr const char *default_glesv1_lib{"libGLESv1_CM.so.1"};
constexpr const char *default_glesv2_lib{"libGLESv2.so.2"};
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册