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:
Gabriel Rauter 2018-09-04 19:48:00 +02:00
commit 4bbc519626

View file

@ -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);