From 5055ec63a70ff365a7719e9967e0813246bf1002 Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Mon, 7 Mar 2011 11:06:51 +0100 Subject: [PATCH] advapi32: Fix array size construct that gcc doesn't like. --- dlls/advapi32/registry.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/dlls/advapi32/registry.c b/dlls/advapi32/registry.c index abaf09d22c5..d5c41642448 100644 --- a/dlls/advapi32/registry.c +++ b/dlls/advapi32/registry.c @@ -43,10 +43,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(reg); #define HKEY_SPECIAL_ROOT_FIRST HKEY_CLASSES_ROOT #define HKEY_SPECIAL_ROOT_LAST HKEY_DYN_DATA -#define NB_SPECIAL_ROOT_KEYS ((UINT_PTR)HKEY_SPECIAL_ROOT_LAST - (UINT_PTR)HKEY_SPECIAL_ROOT_FIRST + 1) - -static HKEY special_root_keys[NB_SPECIAL_ROOT_KEYS]; -static BOOL hkcu_cache_disabled; static const WCHAR name_CLASSES_ROOT[] = {'M','a','c','h','i','n','e','\\', @@ -67,7 +63,7 @@ static const WCHAR name_CURRENT_CONFIG[] = static const WCHAR name_DYN_DATA[] = {'D','y','n','D','a','t','a',0}; -static const WCHAR * const root_key_names[NB_SPECIAL_ROOT_KEYS] = +static const WCHAR * const root_key_names[] = { name_CLASSES_ROOT, NULL, /* HKEY_CURRENT_USER is determined dynamically */ @@ -78,6 +74,11 @@ static const WCHAR * const root_key_names[NB_SPECIAL_ROOT_KEYS] = name_DYN_DATA }; +#define NB_SPECIAL_ROOT_KEYS (sizeof(root_key_names)/sizeof(root_key_names[0])) + +static HKEY special_root_keys[NB_SPECIAL_ROOT_KEYS]; +static BOOL hkcu_cache_disabled; + static const int is_win64 = (sizeof(void *) > sizeof(int)); /* check if value type needs string conversion (Ansi<->Unicode) */