Skip to contentSkip to conversation

mipsnet: Fix compiler warning in debug code

PATCH Applied Stefan Weil 2 participants 2 messages Sep 30, 2010 – Oct 3, 2010

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mipsnet: Fix compiler warning in debug code

size_t needs a different format specifier, so fix this.

---
 hw/mipsnet.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
hw/mipsnet.c +1 -1
index a95b3ce..c5e54ff 100644
@@ -81,7 +81,7 @@ static ssize_t mipsnet_receive(VLANClientState *nc, const uint8_t *buf, size_t s
     MIPSnetState *s = DO_UPCAST(NICState, nc, nc)->opaque;
 
 #ifdef DEBUG_MIPSNET_RECEIVE
-    printf("mipsnet: receiving len=%d\n", size);
+    printf("mipsnet: receiving len=%zu\n", size);
 #endif
     if (!mipsnet_can_receive(nc))
         return -1;
Signature · 1 line
1.7.1
Applied
#1 lore raw

Thanks, applied.

Quoted 25 lines · Stefan Weil

size_t needs a different format specifier, so fix this.

---
 hw/mipsnet.c |    2 +-

 1 files changed, 1 insertions(+), 1 deletions(-)
hw/mipsnet.c +1 -2
index a95b3ce..c5e54ff 100644
@@ -81,7 +81,7 @@ static ssize_t mipsnet_receive(VLANClientState *nc, const uint8_t *buf, size_t s
     MIPSnetState *s = DO_UPCAST(NICState, nc, nc)->opaque;
 
  #ifdef DEBUG_MIPSNET_RECEIVE
-    printf("mipsnet: receiving len=%d\n", size);
+    printf("mipsnet: receiving len=%zu\n", size);
  #endif
     if (!mipsnet_can_receive(nc))
         return -1;
--

1.7.1