From 0d32b9d812bc23640fdd5225de29b7d2ee124d38 Mon Sep 17 00:00:00 2001 From: Pierre Pronchery Date: Tue, 30 Aug 2011 21:42:13 +0000 Subject: [PATCH] Avoid some warnings on some platforms --- src/plugins/gprs.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/plugins/gprs.c b/src/plugins/gprs.c index c1f23f1..6eab161 100644 --- a/src/plugins/gprs.c +++ b/src/plugins/gprs.c @@ -444,15 +444,18 @@ static void _gprs_set_connected(PhonePlugin * plugin, gboolean connected, ? GTK_STOCK_DISCONNECT : GTK_STOCK_CONNECT); if(connected) { - snprintf(buf, sizeof(buf), "Received: %lu kB", in / 1024); + snprintf(buf, sizeof(buf), "Received: %lu kB", + (unsigned long)in / 1024); gtk_label_set_text(GTK_LABEL(gprs->st_in), buf); - snprintf(buf, sizeof(buf), "Sent: %lu kB", out / 1024); + snprintf(buf, sizeof(buf), "Sent: %lu kB", + (unsigned long)out / 1024); gtk_label_set_text(GTK_LABEL(gprs->st_out), buf); gtk_widget_show(gprs->st_in); gtk_widget_show(gprs->st_out); #if GTK_CHECK_VERSION(2, 16, 0) snprintf(buf, sizeof(buf), "%s\nReceived: %lu kB\nSent: %lu kB", - message, in / 1024, out / 1024); + message, (unsigned long)in / 1024, + (unsigned long)out / 1024); gtk_status_icon_set_tooltip_text(gprs->icon, buf); #endif if(gprs->source == 0)