提交 4bbc5196 编写于 作者: G Gabriel Rauter

dbus: demote clang c99-extensions error to warning

This commit uses GCC friendly pragmas to demote a clang error on
C99-specific feature usage to a warning.

The C99 feature that is used here is compound literals. It gets used
trough a macro from the dbus C library.
上级 85fb89c2
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册