[grilo] net: Fix wrong printf format under 32-bit
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [grilo] net: Fix wrong printf format under 32-bit
- Date: Sun, 20 Sep 2020 22:26:15 +0000 (UTC)
commit 8ad058f7610efb01213a4a9bb5427b35a0ec3c83
Author: Rosen Penev <rosenp gmail com>
Date: Sun Sep 20 00:53:25 2020 -0700
net: Fix wrong printf format under 32-bit
Found with -Wformat :
In file included from ../src/grilo.h:31,
from ../libs/net/grl-net-wc.c:52:
../libs/net/grl-net-wc.c: In function 'get_url':
../libs/net/grl-net-wc.c:770:16: warning: format '%lu' expects argument
of type 'long unsigned int', but argument 5 has type 'gint64' {aka
'long long int'} [-Wformat=]
770 | GRL_DEBUG ("delaying web request by %lu seconds",
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
771 | priv->last_request - now);
| ~~~~~~~~~~~~~~~~~~~~~~~~
| |
| gint64 {aka long long int}
libs/net/grl-net-wc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/libs/net/grl-net-wc.c b/libs/net/grl-net-wc.c
index 9bd49223..5a8e89f5 100644
--- a/libs/net/grl-net-wc.c
+++ b/libs/net/grl-net-wc.c
@@ -767,7 +767,7 @@ get_url (GrlNetWc *self,
} else {
priv->last_request += priv->throttling;
- GRL_DEBUG ("delaying web request by %lu seconds",
+ GRL_DEBUG ("delaying web request by %" G_GINT64_FORMAT " seconds",
priv->last_request - now);
id = g_timeout_add_seconds_full (G_PRIORITY_DEFAULT,
priv->last_request - now,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]