devif: fixed some printfs that seem to cause compilation errors with automated tests
authorRoni Häcki <roni.haecki@inf.ethz.ch>
Tue, 29 Aug 2017 07:54:12 +0000 (09:54 +0200)
committerRoni Häcki <roni.haecki@inf.ethz.ch>
Tue, 29 Aug 2017 07:54:12 +0000 (09:54 +0200)
Signed-off-by: Roni Häcki <roni.haecki@inf.ethz.ch>

lib/devif/backends/debug/devif_backend_debug.c
lib/devif/backends/net/ip/devif_backend_ip.c
usr/tests/devif/udp_queue.c

index 7d3b747..486798f 100644 (file)
@@ -736,7 +736,7 @@ static errval_t debug_dequeue(struct devq* q, regionid_t* rid, genoffset_t* offs
         //
         // Add region
         if (que->regions == NULL) {
-            printf("Adding region frirst %d len \n", *offset + *length);
+            printf("Adding region frirst %lu len \n", *offset + *length);
             que->regions = calloc(1, sizeof(struct memory_list));
             que->regions->rid = *rid;
             que->regions->not_consistent = true;
@@ -757,7 +757,7 @@ static errval_t debug_dequeue(struct devq* q, regionid_t* rid, genoffset_t* offs
             ele = ele->next;
         }
 
-        printf("Adding region second %d len \n", *offset + *length);
+        printf("Adding region second %lu len \n", *offset + *length);
         // add the reigon
         ele->next = calloc(1,sizeof(struct memory_list));
         ele = ele->next;
index 9117f2c..e76d8e3 100644 (file)
@@ -196,7 +196,7 @@ static errval_t ip_dequeue(struct devq* q, regionid_t* rid, genoffset_t* offset,
 
         // Correct ip for this queue?
         if (header->ip.src != que->header.ip.dest) {
-            printf("IP queue: dropping packet, wrong IP is %lu should be %lu\n",
+            printf("IP queue: dropping packet, wrong IP is %"PRIu32" should be %"PRIu32"\n",
                    header->ip.src, que->header.ip.dest);
             err = que->q->f.enq(que->q, *rid, *offset, *length, 0, 0, NETIF_RXFLAG);
             return err_push(err, NET_QUEUE_ERR_WRONG_IP);
index f9ada2d..1cb4870 100644 (file)
@@ -168,7 +168,7 @@ static void test_udp(void)
     char* data = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
                  "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
                  "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa";
-    printf("Data length %d \n", strlen(data));
+    printf("Data length %zu \n", strlen(data));
 
     for (int i = 0; i < NUM_ENQ; i++) {
         udp_write_buffer(udp_q, regid_tx, i*(TX_BUF_SIZE),