Whamcloud - gitweb
LU-16518 osc: fix unused-but-set-variable warnings 82/58182/2
authorTimothy Day <timday@amazon.com>
Mon, 24 Feb 2025 06:18:11 +0000 (01:18 -0500)
committerOleg Drokin <green@whamcloud.com>
Thu, 6 Mar 2025 08:08:52 +0000 (08:08 +0000)
When CONFIG_CRC_T10DIF=n and osc_checksum_bulk_t10pi() is
a macro, Clang generates compiler warnings for some of the
arguments - since they are not used elsewhere. Silence this
by creating a proper function.

Test-Parameters: trivial
Signed-off-by: Timothy Day <timday@amazon.com>
Change-Id: I502dcf1764602711fcf2cf3553ad6d2f4fed3f14
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/58182
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Max Wang <wamax@amazon.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
lustre/osc/osc_request.c

index 726bd4d..5c64f94 100644 (file)
@@ -1287,8 +1287,15 @@ out:
 #else /* !CONFIG_CRC_T10DIF */
 #define obd_dif_ip_fn NULL
 #define obd_dif_crc_fn NULL
-#define osc_checksum_bulk_t10pi(name, nob, pgc, pga, opc, fn, ssize, csum, re) \
-       -EOPNOTSUPP
+
+static int osc_checksum_bulk_t10pi(const char *obd_name, int nob,
+                                  size_t pg_count, struct brw_page **pga,
+                                  int opc, obd_dif_csum_fn *fn,
+                                  int sector_size,
+                                  u32 *check_sum, bool resend)
+{
+       return -EOPNOTSUPP;
+}
 #endif /* CONFIG_CRC_T10DIF */
 
 static int osc_checksum_bulk(int nob, size_t pg_count,