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.
This commit is contained in:
parent
85fb89c2f4
commit
4bbc519626
1 changed files with 5 additions and 0 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue