From 9a4a7211eb27c5b87837cca9211b26ed7baaf8f8 Mon Sep 17 00:00:00 2001 From: Lee Duncan Date: Fri, 3 Jan 2020 12:08:45 -0800 Subject: [PATCH] Fix i586 size_t compiler error. This fix silences a compiler complaint on i586 (32-bit) in handle_writesame(). A similar fix is done in handle_format_unit(), since the code is very similar. Original-fix-by: David Disseldorp --- tcmur_cmd_handler.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tcmur_cmd_handler.c b/tcmur_cmd_handler.c index 132c6682..10589ebf 100644 --- a/tcmur_cmd_handler.c +++ b/tcmur_cmd_handler.c @@ -712,7 +712,7 @@ static int handle_writesame(struct tcmu_device *dev, struct tcmulib_cmd *cmd) uint32_t block_size = tcmu_dev_get_block_size(dev); uint64_t start_lba = tcmu_cdb_get_lba(cdb); uint64_t write_lbas; - size_t max_xfer_length, length = 1024 * 1024; + uint64_t max_xfer_length, length = 1024 * 1024; struct write_same *write_same; int i, ret; @@ -1979,7 +1979,7 @@ static void handle_format_unit_cbk(struct tcmu_device *dev, static int handle_format_unit(struct tcmu_device *dev, struct tcmulib_cmd *cmd) { struct tcmur_device *rdev = tcmu_dev_get_private(dev); struct tcmur_cmd *tcmur_cmd = cmd->hm_private; - size_t max_xfer_length, length = 1024 * 1024; + uint64_t max_xfer_length, length = 1024 * 1024; uint32_t block_size = tcmu_dev_get_block_size(dev); uint64_t num_lbas = tcmu_dev_get_num_lbas(dev); int ret;