amqp1 plugin: fix sign compare warning
authorRuben Kerkhof <ruben@rubenkerkhof.com>
Tue, 29 May 2018 09:23:25 +0000 (11:23 +0200)
committerRuben Kerkhof <ruben@rubenkerkhof.com>
Tue, 29 May 2018 09:23:25 +0000 (11:23 +0200)
  CC       src/amqp1_la-amqp1.lo
src/amqp1.c: In function ‘amqp1_send_out_messages’:
src/amqp1.c:138:29: warning: comparison of integer expressions of different signedness: ‘size_t’ {aka ‘long unsigned int’} and ‘int’ [-Wsign-compare]
       if (DEQ_SIZE(to_send) == link_credit)
                             ^~

src/amqp1.c

index e60142b..a6a2d35 100644 (file)
@@ -135,7 +135,7 @@ static int amqp1_send_out_messages(pn_link_t *link) /* {{{ */
     while (cdm) {
       DEQ_REMOVE_HEAD(out_messages);
       DEQ_INSERT_TAIL(to_send, cdm);
-      if (DEQ_SIZE(to_send) == link_credit)
+      if (DEQ_SIZE(to_send) == (size_t)link_credit)
         break;
       cdm = DEQ_HEAD(out_messages);
     }