]> xenbits.xensource.com Git - unikraft/unikraft.git/commitdiff
lib/ukblkdev: Remove unused warnings
authorMichalis Pappas <michalis@unikraft.io>
Mon, 25 Sep 2023 14:10:33 +0000 (16:10 +0200)
committerRazvan Deaconescu <razvand@unikraft.io>
Fri, 20 Oct 2023 16:35:55 +0000 (19:35 +0300)
When building without assertions some arguments and variables
are not used. This commit adds respective attributes to solve
the warning.

Signed-off-by: Marc Rittinghaus <marc.rittinghaus@kit.edu>
Reviewed-by: Michalis Pappas <michalis@unikraft.io>
Reviewed-by: Andrei Topala <topala.andrei@gmail.com>
Reviewed-by: Marco Schlumpp <marco@unikraft.io>
Approved-by: Razvan Deaconescu <razvand@unikraft.io>
GitHub-Closes: #1115

lib/ukblkdev/blkdev.c

index f8c0c3570b5da7f75de25a61cc2fb49d1e58a3b3..980b94e63784493e0a7a2baaabe505123f21ec61 100644 (file)
@@ -419,12 +419,11 @@ struct uk_blkdev_sync_io_request {
        struct uk_semaphore s;
 };
 
-static void __sync_io_callback(struct uk_blkreq *req,
-               void *cookie_callback)
+static void __sync_io_callback(struct uk_blkreq *req __unused,
+                              void *cookie_callback)
 {
        struct uk_blkdev_sync_io_request *sync_io_req;
 
-       UK_ASSERT(req);
        UK_ASSERT(cookie_callback);
 
        sync_io_req = (struct uk_blkdev_sync_io_request *)cookie_callback;