From b0a059537147237e868b4a8f07922ae8a349e55c Mon Sep 17 00:00:00 2001 From: Jacob Moody Date: Sun, 12 May 2024 00:26:37 +0000 Subject: [PATCH] power64: refactor va_arg in u.h to fix warnings Bring over conventions from other archs. This issue shows up when you don't put va_end, which our systemcall handlers are guilty of. --- power64/include/u.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/power64/include/u.h b/power64/include/u.h index 7b94ed33a..41ce7a0a8 100644 --- a/power64/include/u.h +++ b/power64/include/u.h @@ -84,9 +84,9 @@ typedef char* va_list; USED(list) #define va_arg(list, mode)\ ((sizeof(mode) == 1)?\ - ((mode*)(list += 8))[-1]:\ + ((list += 8), (mode*)list)[-1]:\ (sizeof(mode) == 2)?\ - ((mode*)(list += 8))[-1]:\ + ((list += 8), (mode*)list)[-1]:\ (sizeof(mode) == 4)?\ - ((mode*)(list += 8))[-1]:\ - ((mode*)(list += sizeof(mode)))[-1]) + ((list += 8), (mode*)list)[-1]:\ + ((list += sizeof(mode)), (mode*)list)[-1])