Alexandre Julliard : advapi32: Fix array size construct that gcc doesn' t like.
Alexandre Julliard
julliard at winehq.org
Mon Mar 7 12:22:43 CST 2011
Module: wine
Branch: master
Commit: 5055ec63a70ff365a7719e9967e0813246bf1002
URL: http://source.winehq.org/git/wine.git/?a=commit;h=5055ec63a70ff365a7719e9967e0813246bf1002
Author: Alexandre Julliard <julliard at winehq.org>
Date: Mon Mar 7 11:06:51 2011 +0100
advapi32: Fix array size construct that gcc doesn't like.
---
dlls/advapi32/registry.c | 11 ++++++-----
1 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/dlls/advapi32/registry.c b/dlls/advapi32/registry.c
index abaf09d..d5c4164 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) */
More information about the wine-cvs
mailing list