From 80f02460733c0f9ae9741c4919382efba8b6433c Mon Sep 17 00:00:00 2001 From: Vasant Hegde Date: Mon, 5 Apr 2021 16:43:47 +0530 Subject: hw/ipmi: Fix misleading-indentation failures MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Hitting below issue on recent distro (fedora-rawhide). sample failure: --------------- [ HOSTCC ] hw/ipmi/test/run-fru.c In file included from hw/ipmi/test/run-fru.c:10: hw/ipmi/test/../ipmi-fru.c: In function 'fru_fill_product_info': hw/ipmi/test/../ipmi-fru.c:80:17: error: this 'if' clause does not guard... [-Werror=misleading-indentation] 80 | if (rc < 1) return OPAL_PARAMETER; rc; }) | ^~ hw/ipmi/test/../ipmi-fru.c:102:18: note: in expansion of macro 'FRU_INSERT_STRING' 102 | index += FRU_INSERT_STRING(&buf[index], info->manufacturer); | ^~~~~~~~~~~~~~~~~ hw/ipmi/test/../ipmi-fru.c:80:52: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if' 80 | if (rc < 1) return OPAL_PARAMETER; rc; }) | ^~ hw/ipmi/test/../ipmi-fru.c:102:18: note: in expansion of macro 'FRU_INSERT_STRING' 102 | index += FRU_INSERT_STRING(&buf[index], info->manufacturer); | ^~~~~~~~~~~~~~~~~ Signed-off-by: Vasant Hegde Reviewed-by: Dan HorĂ¡k --- hw/ipmi/ipmi-fru.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'hw/ipmi') diff --git a/hw/ipmi/ipmi-fru.c b/hw/ipmi/ipmi-fru.c index da866ad..86c9ca0 100644 --- a/hw/ipmi/ipmi-fru.c +++ b/hw/ipmi/ipmi-fru.c @@ -77,7 +77,7 @@ static u8 fru_checksum(u8 *buf, int len) #define FRU_INSERT_STRING(x, y) \ ({ rc = fru_insert_string(x, y); \ - if (rc < 1) return OPAL_PARAMETER; rc; }) + { if (rc < 1) return OPAL_PARAMETER; } rc; }) static int fru_fill_product_info(u8 *buf, struct product_info *info, size_t size) { -- cgit v1.1