>From 997f887e1e71a4cd39260d455f0872d9fd5dde3f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pavel=20B=C5=99ezina?= Date: Fri, 18 Apr 2014 10:26:14 +0200 Subject: [PATCH 5/5] sbus request: fix error initialization fixes: sssd_dbus_request.c:28:1: error: missing initializer [-Werror=missing-field-initializers] sssd_dbus_request.c:28:1: error: (near initialization for 'error_internal.dummy1') [-Werror=missing-field-initializers] --- src/sbus/sssd_dbus_request.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/sbus/sssd_dbus_request.c b/src/sbus/sssd_dbus_request.c index 1546f0ddf349ea595af3d505fd9d6b8931ca9d92..387691dea394ea3c8cf7f430ac15f52f84d3082b 100644 --- a/src/sbus/sssd_dbus_request.c +++ b/src/sbus/sssd_dbus_request.c @@ -25,7 +25,7 @@ #include #include -static const DBusError error_internal = { DBUS_ERROR_FAILED, "Internal Error" }; +#define INTERNAL_ERROR "Internal Error" static int sbus_request_destructor(struct sbus_request *dbus_req) { @@ -60,6 +60,7 @@ sbus_request_invoke_or_finish(struct sbus_request *dbus_req, void *handler_data, sbus_method_invoker_fn invoker_fn) { + DBusError error; int ret; if (invoker_fn) { @@ -76,7 +77,8 @@ sbus_request_invoke_or_finish(struct sbus_request *dbus_req, sbus_request_finish(dbus_req, NULL); break; default: - sbus_request_fail_and_finish(dbus_req, &error_internal); + dbus_set_error_const(&error, DBUS_ERROR_FAILED, INTERNAL_ERROR); + sbus_request_fail_and_finish(dbus_req, &error); break; } } -- 1.9.0