From da075bb261d84b1f2b19a0446b952dcfb2ad7daa Mon Sep 17 00:00:00 2001 From: Themaister Date: Wed, 28 Mar 2012 23:18:05 +0200 Subject: [PATCH] Default initialize config macro values to stop eager compiler warnings. --- conf/config_file_macros.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/conf/config_file_macros.h b/conf/config_file_macros.h index 211e78b14f..03ca981bc6 100644 --- a/conf/config_file_macros.h +++ b/conf/config_file_macros.h @@ -23,25 +23,25 @@ #include #define CONFIG_GET_BOOL_BASE(conf, base, var, key) do { \ - bool tmp; \ + bool tmp = false; \ if (config_get_bool(conf, key, &tmp)) \ base.var = tmp; \ } while(0) #define CONFIG_GET_INT_BASE(conf, base, var, key) do { \ - int tmp; \ + int tmp = 0; \ if (config_get_int(conf, key, &tmp)) \ base.var = tmp; \ } while(0) #define CONFIG_GET_UINT64_BASE(conf, base, var, key) do { \ - uint64_t tmp; \ + uint64_t tmp = 0; \ if (config_get_int(conf, key, &tmp)) \ base.var = tmp; \ } while(0) #define CONFIG_GET_FLOAT_BASE(conf, base, var, key) do { \ - float tmp; \ + float tmp = 0.0f; \ if (config_get_float(conf, key, &tmp)) \ base.var = tmp; \ } while(0)