From 1201a6b7399e09d69b4a4a59073eb8db8707b286 Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Tue, 9 Feb 2016 07:06:07 +0100 Subject: [PATCH] unused variable, bad version check --- src/bindings.c | 1 - src/kernel/save.c | 11 ++++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/bindings.c b/src/bindings.c index 5e05c8b53..99458c08d 100755 --- a/src/bindings.c +++ b/src/bindings.c @@ -209,7 +209,6 @@ static int tolua_setkey(lua_State * L) const char *name = tolua_tostring(L, 1, 0); int value = tolua_toboolean(L, 2, 0); int flag = atoi36(name); - bool isset = key_get(global.attribs, flag); if (value) { key_set(&global.attribs, flag); } diff --git a/src/kernel/save.c b/src/kernel/save.c index c5239d2a5..3b7c13705 100644 --- a/src/kernel/save.c +++ b/src/kernel/save.c @@ -578,11 +578,12 @@ const struct locale *lang) } int read_attribs(storage *store, attrib **alist, void *owner) { -#if RELEASE_VERSION < ATHASH_VERSION - return a_read_orig(store, alist, owner); -#else - return a_read(store, alist, owner); -#endif + if (global.data_version < ATHASH_VERSION) { + return a_read_orig(store, alist, owner); + } + else { + return a_read(store, alist, owner); + } } void write_attribs(storage *store, attrib *alist, const void *owner)