From 908df5f46c9c730084d121fcb6122fe0d0a49d72 Mon Sep 17 00:00:00 2001 From: Aymeric Wibo Date: Sun, 3 Nov 2024 23:47:18 +0100 Subject: [PATCH] var: Remove unused `anonymous` field --- flamingo/flamingo.h | 1 - flamingo/scope.h | 4 ---- flamingo/val.h | 2 ++ 3 files changed, 2 insertions(+), 5 deletions(-) diff --git a/flamingo/flamingo.h b/flamingo/flamingo.h index d4c019a..e5b3a44 100644 --- a/flamingo/flamingo.h +++ b/flamingo/flamingo.h @@ -143,7 +143,6 @@ struct flamingo_val_t { }; struct flamingo_var_t { - bool anonymous; bool is_static; char* key; diff --git a/flamingo/scope.h b/flamingo/scope.h index 3625b73..00f8ed1 100644 --- a/flamingo/scope.h +++ b/flamingo/scope.h @@ -56,10 +56,6 @@ static flamingo_var_t* scope_shallow_find_var(flamingo_scope_t* scope, char cons for (size_t i = 0; i < scope->vars_size; i++) { flamingo_var_t* const var = &scope->vars[i]; - if (var->anonymous) { - continue; - } - if (var->key_size == key_size && memcmp(var->key, key, key_size) == 0) { return var; } diff --git a/flamingo/val.h b/flamingo/val.h index 7b6967c..f0899e8 100644 --- a/flamingo/val.h +++ b/flamingo/val.h @@ -192,6 +192,8 @@ static bool val_eq(flamingo_val_t* x, flamingo_val_t* y) { case FLAMINGO_VAL_KIND_COUNT: return false; } + + return false; // XXX To make GCC happy. } static void val_free(flamingo_val_t* val) {