From 23bca2a8acb31edc4633a81729e351a57b16489e Mon Sep 17 00:00:00 2001 From: Benjamin Berg Date: Thu, 1 Jul 2021 17:37:53 +0200 Subject: [PATCH] spi: Fix pointer cast on 32bit architectures --- libfprint/fpi-spi-transfer.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libfprint/fpi-spi-transfer.c b/libfprint/fpi-spi-transfer.c index f820c53..f5d2617 100644 --- a/libfprint/fpi-spi-transfer.c +++ b/libfprint/fpi-spi-transfer.c @@ -323,7 +323,7 @@ transfer_chunk (FpiSpiTransfer *transfer, gsize full_length, gsize *transferred) { if (skip < transfer->length_wr && len < block_size) { - xfer[transfers].tx_buf = (guint64) transfer->buffer_wr + skip; + xfer[transfers].tx_buf = (gsize) transfer->buffer_wr + skip; xfer[transfers].len = MIN (block_size, transfer->length_wr - skip); len += xfer[transfers].len; @@ -340,7 +340,7 @@ transfer_chunk (FpiSpiTransfer *transfer, gsize full_length, gsize *transferred) { if (skip < transfer->length_rd && len < block_size) { - xfer[transfers].rx_buf = (guint64) transfer->buffer_rd + skip; + xfer[transfers].rx_buf = (gsize) transfer->buffer_rd + skip; xfer[transfers].len = MIN (block_size, transfer->length_rd - skip); len += xfer[transfers].len;