[MM master] Compile error and patch

The Ubuntu builder found an error in modem manager master branch. A
proposed patch is attached. I could not find any easy way to get a
string out of the enum value.

>From 2fd206a365d71d4d66f9f456084f9ca303c059a4 Mon Sep 17 00:00:00 2001
From: "Marius B. Kotsbak" <marius kotsbak com>
Date: Sat, 19 Jan 2013 17:40:49 +0100
Subject: [PATCH] Fix compile warning/error.

"power_state" is an enum, not a string:

error: format '%s' expects argument of type 'char *', but argument 5 has type 'unsigned int' [-Werror=format]
 src/mm-iface-modem.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/mm-iface-modem.c b/src/mm-iface-modem.c
index edb9b7d..312645a 100644
--- a/src/mm-iface-modem.c
+++ b/src/mm-iface-modem.c
@@ -1525,7 +1525,7 @@ handle_set_power_state_auth_ready (MMBaseModem *self,
         g_dbus_method_invocation_return_error (ctx->invocation,
-                                               "Cannot set '%s' power state",
+                                               "Cannot set power state: %u",
         handle_set_power_state_context_free (ctx);

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]