blob: ea36b1cd914ca08645b74d220d44cecede7df83a [file] [log] [blame]
Patrick Williamsb48b7b42016-08-17 15:04:38 -05001Upstream-Status: Pending
2
3From c81bf54d6eb870286662a11d3b4a994717c47696 Mon Sep 17 00:00:00 2001
4From: Armin Kuster <akuster808@gmail.com>
5Date: Tue, 8 Sep 2015 05:36:27 -0700
6Subject: [PATCH] testmmap: fix compile issue with gcc 5.x
7
8this fixes:
9examples/testmmap.c:540:10: error: format '%ld' expects argument of type 'long int', but argument 3 has type 'ssize_t {aka const int}' [-Werror=format=]
10| printf("ring_ofs[%d] %ld\n", i, nifp->ring_ofs[i]);
11| ^
12
13Signed-off-by: Armin Kuster <akuster808@gmail.com>
14---
15 examples/testmmap.c | 2 +-
16 1 file changed, 1 insertion(+), 1 deletion(-)
17
18diff --git a/examples/testmmap.c b/examples/testmmap.c
19index d7f6acc..934489a 100644
20--- a/examples/testmmap.c
21+++ b/examples/testmmap.c
22@@ -537,7 +537,7 @@ do_if()
23 for (i = 0; i < 5; i++)
24 printf("spare1[%d] %u\n", i, nifp->ni_spare1[i]);
25 for (i = 0; i < (nifp->ni_tx_rings + nifp->ni_rx_rings + 2); i++)
26- printf("ring_ofs[%d] %ld\n", i, nifp->ring_ofs[i]);
27+ printf("ring_ofs[%d] %zd\n", i, nifp->ring_ofs[i]);
28 }
29
30 struct netmap_ring *
31--
322.3.5
33