From 819f767dbd90d1632f8401d90a648b743f3e2404 Mon Sep 17 00:00:00 2001 From: Rodrigo Arias Date: Wed, 15 Feb 2023 19:57:59 +0100 Subject: [PATCH] Use constant expression for the model_id Fixes gcc 6.5.0 --- src/emu/kernel/setup.c | 2 +- src/emu/nanos6/setup.c | 2 +- src/emu/nodes/setup.c | 2 +- src/emu/nosv/setup.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/emu/kernel/setup.c b/src/emu/kernel/setup.c index 0b318cb..c59a86c 100644 --- a/src/emu/kernel/setup.c +++ b/src/emu/kernel/setup.c @@ -1,7 +1,7 @@ #include "kernel_priv.h" static const char model_name[] = "kernel"; -static const int model_id = 'K'; +enum { model_id = 'K' }; struct model_spec model_kernel = { .name = model_name, diff --git a/src/emu/nanos6/setup.c b/src/emu/nanos6/setup.c index 69ec790..0d4a624 100644 --- a/src/emu/nanos6/setup.c +++ b/src/emu/nanos6/setup.c @@ -1,7 +1,7 @@ #include "nanos6_priv.h" static const char model_name[] = "nanos6"; -static const int model_id = '6'; +enum { model_id = '6' }; struct model_spec model_nanos6 = { .name = model_name, diff --git a/src/emu/nodes/setup.c b/src/emu/nodes/setup.c index 063f6d0..58808df 100644 --- a/src/emu/nodes/setup.c +++ b/src/emu/nodes/setup.c @@ -1,7 +1,7 @@ #include "nodes_priv.h" static const char model_name[] = "nodes"; -static const int model_id = 'D'; +enum { model_id = 'D' }; struct model_spec model_nodes = { .name = model_name, diff --git a/src/emu/nosv/setup.c b/src/emu/nosv/setup.c index 555eb39..9778ba8 100644 --- a/src/emu/nosv/setup.c +++ b/src/emu/nosv/setup.c @@ -1,7 +1,7 @@ #include "nosv_priv.h" static const char model_name[] = "nosv"; -static const int model_id = 'V'; +enum { model_id = 'V' }; struct model_spec model_nosv = { .name = model_name,