From: Bart Van Assche Date: Tue, 4 Oct 2022 19:22:00 +0000 (-0700) Subject: Android: Fix the build of the 'sg' engine X-Git-Tag: fio-3.33~27^2~1 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=ac0a7e39f048e68aa102b4543a8b411b430ca007;p=fio.git 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 --- 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);