Fix error with gcc -Wformat -Werror=format-security
authorOsamu Aoki <osamu@debian.org>
Fri, 19 Jul 2013 09:14:19 +0000 (18:14 +0900)
committerfujiwarat <takao.fujiwara1@gmail.com>
Fri, 19 Jul 2013 09:14:19 +0000 (18:14 +0900)
BUG=http://code.google.com/p/ibus/issues/detail?id=1638
TEST=bus/ibusimpl.c

Review URL: https://codereview.appspot.com/11471044
Patch from Osamu Aoki <osamu@debian.org>.

bus/ibusimpl.c

index 2cd293d..4f8afe9 100644 (file)
@@ -963,7 +963,7 @@ _ibus_current_input_context_depre (BusIBusImpl           *ibus,
     if (variant == NULL) {
         g_dbus_method_invocation_return_error (
                 invocation, G_DBUS_ERROR, G_DBUS_ERROR_FAILED,
-                error->message);
+                "%s", error->message);
         g_error_free (error);
     } else {
         const gchar *path = g_variant_get_string (variant, NULL);
@@ -1357,7 +1357,7 @@ _ibus_get_global_engine_depre (BusIBusImpl           *ibus,
         g_dbus_method_invocation_return_error (
                 invocation,
                 G_DBUS_ERROR, G_DBUS_ERROR_FAILED,
-                error->message);
+                "%s", error->message);
         g_error_free (error);
     } else {
         GVariant *retval = g_variant_get_variant (variant);