Use "%uz" to print a size_t type, which resolves the following warning/error.

cc1: warnings being treated as errors
fcoemon.c: In function ‘fcm_fc_event_recv’:
fcoemon.c:856:4: error: format ‘%d’ expects type ‘int’, but argument 2 has type 
‘size_t’
make: *** [fcoemon-fcoemon.o] Error 1

Signed-off-by: Robert Love <[email protected]>
---
 fcoemon.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/fcoemon.c b/fcoemon.c
index 45a7645..87f4e26 100644
--- a/fcoemon.c
+++ b/fcoemon.c
@@ -817,7 +817,7 @@ static void fcm_fc_event_recv(UNUSED void *arg)
        struct nlmsghdr *hp;
        struct fc_nl_event *fc_event;
        int plen;
-       int rlen;
+       size_t rlen;
        char *buf;
 
        buf = malloc(DEF_RX_BUF_SIZE);
@@ -851,7 +851,7 @@ static void fcm_fc_event_recv(UNUSED void *arg)
                plen = NLMSG_PAYLOAD(hp, 0);
                fc_event = (struct fc_nl_event *)NLMSG_DATA(hp);
                if (plen < sizeof(*fc_event)) {
-                       FCM_LOG("too short (%d) to be an FC event", rlen);
+                       FCM_LOG("too short (%zu) to be an FC event", rlen);
                        break;
                }
                fcm_fc_event_log(fc_event);

_______________________________________________
fcoe-devel mailing list
[email protected]
http://lists.open-fcoe.org/mailman/listinfo/fcoe-devel

Reply via email to