From fe17f0df1f73559ef1017bac2d4772d5550c03a3 Mon Sep 17 00:00:00 2001 From: Augustin Cavalier Date: Mon, 18 Jun 2018 22:05:45 -0400 Subject: [PATCH] scsi: Use _res and not res in MK_ERROR. Some users of MK_ERROR pass in parameters from a variable called "res", which is obviously not what they want to do, as that will use this "res" and not theirs. Spotted by Clang. --- headers/private/drivers/scsi_periph.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/headers/private/drivers/scsi_periph.h b/headers/private/drivers/scsi_periph.h index 9be19ab86f..9d470c6c1a 100644 --- a/headers/private/drivers/scsi_periph.h +++ b/headers/private/drivers/scsi_periph.h @@ -44,8 +44,8 @@ typedef struct err_res { } err_res; #define MK_ERROR( aaction, code ) ({ \ - err_res res = {error_code: (code), action: (aaction) }; \ - res; \ + err_res _res = {error_code: (code), action: (aaction) }; \ + _res; \ }) // cookie issued by driver to identify itself