dbus: client: fix format specifiers for 64-bit types
authorBartosz Golaszewski <bartosz.golaszewski@linaro.org>
Tue, 1 Oct 2024 14:34:32 +0000 (16:34 +0200)
committerBartosz Golaszewski <bartosz.golaszewski@linaro.org>
Tue, 1 Oct 2024 18:07:48 +0000 (20:07 +0200)
Use G_GUINT64_FORMAT whenever printing 64-bit types to avoid format
specifier warnings.

Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
dbus/client/info.c
dbus/client/notify.c

index fa08a3f10cd793dc5200777ce6c80cb9cc020fe0..66e818910b2af02d3ca868c52b0726aca6bc85fb 100644 (file)
@@ -40,7 +40,7 @@ static void do_print_line_info(GpiodbusObject *line_obj,
                                       props->edge, props->event_clock);
                if (props->debounced)
                        g_string_append_printf(attributes,
-                                              "debounce-period=%lu,",
+                                              "debounce-period=%"G_GUINT64_FORMAT",",
                                               props->debounce_period);
        }
 
index f5a8e5d6db4260b378d4c371b96254477ca6ab6e..5c73343e3ffaf35c8b9143140860bc63cc39130e 100644 (file)
@@ -93,7 +93,7 @@ on_properties_changed(GpiodbusLine *line, GVariant *changed_properties,
                        g_string_printf(change, "event-clock=>%s",
                                               g_variant_get_string(val, NULL));
                } else if (g_strcmp0(key, "DebouncePeriodUs") == 0) {
-                       g_string_printf(change, "debounce-period=>%ld",
+                       g_string_printf(change, "debounce-period=>%"G_GUINT64_FORMAT"",
                                               g_variant_get_uint64(val));
                } else if (g_strcmp0(key, "Managed") == 0) {
                        g_string_printf(change, "managed=>%s",
@@ -150,7 +150,7 @@ static void print_line_info(GpiodbusLine *line, GpiodbusChip *chip)
 
                if (props->debounced)
                        g_string_append_printf(attrs,
-                                              "debounced,debounce-period=%lu",
+                                              "debounced,debounce-period=%"G_GUINT64_FORMAT"",
                                               props->debounce_period);
        }