From 64e5443f3fee471c12b017cbd26b39c6b342417c Mon Sep 17 00:00:00 2001 From: Stefan Jumarea Date: Sat, 9 Sep 2023 13:54:25 +0300 Subject: [PATCH] arch/ctx.h: Update ctx members declaration order Out-of-order designated initialization is not allowed in C++, so change the `ctx` declaration order to match the `ukarch_ctx` definition order. Signed-off-by: Stefan Jumarea Reviewed-by: Sergiu Moga Reviewed-by: Andrei Tatar Approved-by: Razvan Deaconescu Tested-by: Unikraft CI GitHub-Closes: #1085 --- include/uk/arch/ctx.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/uk/arch/ctx.h b/include/uk/arch/ctx.h index cb9d6e974..dda40e2b1 100644 --- a/include/uk/arch/ctx.h +++ b/include/uk/arch/ctx.h @@ -93,7 +93,7 @@ static inline void ukarch_ctx_init_bare(struct ukarch_ctx *ctx, /* NOTE: We are not checking if SP is given or if SP is aligned because * execution does not have to start with a function entry. */ - (*ctx) = (struct ukarch_ctx){ .sp = sp, .ip = ip }; + (*ctx) = (struct ukarch_ctx){ .ip = ip, .sp = sp }; } /** -- 2.39.5