From ac0a7e39f048e68aa102b4543a8b411b430ca007 Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Tue, 4 Oct 2022 12:22:00 -0700 Subject: [PATCH] Android: Fix the build of the 'sg' engine Fix the following compiler error: engines/sg.c:1337:46: error: argument type 'void' is incomplete snprintf(msgchunk, MAXMSGCHUNK, " %02x", hdr->sbp[i]); Signed-off-by: Bart Van Assche --- engines/sg.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/engines/sg.c b/engines/sg.c index 72ee07ba..24783374 100644 --- a/engines/sg.c +++ b/engines/sg.c @@ -1331,10 +1331,12 @@ static char *fio_sgio_errdetails(struct io_u *io_u) strlcat(msg, ". ", MAXERRDETAIL); } if (hdr->sb_len_wr) { + const uint8_t *const sbp = hdr->sbp; + snprintf(msgchunk, MAXMSGCHUNK, "Sense Data (%d bytes):", hdr->sb_len_wr); strlcat(msg, msgchunk, MAXERRDETAIL); for (i = 0; i < hdr->sb_len_wr; i++) { - snprintf(msgchunk, MAXMSGCHUNK, " %02x", hdr->sbp[i]); + snprintf(msgchunk, MAXMSGCHUNK, " %02x", sbp[i]); strlcat(msg, msgchunk, MAXERRDETAIL); } strlcat(msg, ". ", MAXERRDETAIL); -- 2.25.1