]> git.ipfire.org Git - thirdparty/snapper.git/commitdiff
Fix compiler warnings in example C client
authorDavid Disseldorp <ddiss@suse.de>
Mon, 15 Oct 2012 13:36:58 +0000 (15:36 +0200)
committerDavid Disseldorp <ddiss@suse.de>
Mon, 15 Oct 2012 13:41:27 +0000 (15:41 +0200)
examples/C/snapper_dbus_cli.c

index 3e972bda7f89bab1863baa353bac037e06882977..63c7c129c277e2d6f0e25143d0cecdae94e10b92 100644 (file)
@@ -26,6 +26,8 @@
 #include <stdlib.h>
 #include <string.h>
 #include <errno.h>
+#define __STDC_FORMAT_MACROS
+#include <inttypes.h>
 
 #define CDBUS_SIG_LIST_SNAPS_RSP "a(uqutussa{ss})"
 #define CDBUS_SIG_LIST_CONFS_RSP "a(ssa{ss})"
@@ -337,7 +339,7 @@ static void snap_array_print(int32_t num_snaps,
                printf("id: %u\n"
                       "type: %u\n"
                       "pre_id: %u\n"
-                      "time: %lu\n"
+                      "time: %" PRIu64 "\n"
                       "creator_uid: %u\n"
                       "desc: %s\n"
                       "cleanup: %s\n",
@@ -944,7 +946,6 @@ static int cdbus_del_snap_pack(char *snapper_conf,
 static int cdbus_del_snap_unpack(DBusConnection *conn,
                                 DBusMessage *rsp_msg)
 {
-       DBusMessageIter iter;
        int msg_type;
        const char *sig;