More explicit initialization of info_size for stupid compilers.

This commit is contained in:
Alexandre Julliard 2002-07-05 21:30:38 +00:00
parent e7ea9b65ca
commit a010932a3f
2 changed files with 6 additions and 6 deletions

View file

@ -825,7 +825,7 @@ DWORD WINAPI RegQueryValueExW( HKEY hkey, LPCWSTR name, LPDWORD reserved, LPDWOR
DWORD total_size;
char buffer[256], *buf_ptr = buffer;
KEY_VALUE_PARTIAL_INFORMATION *info = (KEY_VALUE_PARTIAL_INFORMATION *)buffer;
static const int info_size = info->Data - (UCHAR *)info;
static const int info_size = offsetof( KEY_VALUE_PARTIAL_INFORMATION, Data );
TRACE("(0x%x,%s,%p,%p,%p,%p=%ld)\n",
hkey, debugstr_w(name), reserved, type, data, count, count ? *count : 0 );
@ -892,7 +892,7 @@ DWORD WINAPI RegQueryValueExA( HKEY hkey, LPCSTR name, LPDWORD reserved, LPDWORD
DWORD total_size;
char buffer[256], *buf_ptr = buffer;
KEY_VALUE_PARTIAL_INFORMATION *info = (KEY_VALUE_PARTIAL_INFORMATION *)buffer;
static const int info_size = info->Data - (UCHAR *)info;
static const int info_size = offsetof( KEY_VALUE_PARTIAL_INFORMATION, Data );
TRACE("(0x%x,%s,%p,%p,%p,%p=%ld)\n",
hkey, debugstr_a(name), reserved, type, data, count, count ? *count : 0 );
@ -1040,7 +1040,7 @@ DWORD WINAPI RegEnumValueW( HKEY hkey, DWORD index, LPWSTR value, LPDWORD val_co
DWORD total_size;
char buffer[256], *buf_ptr = buffer;
KEY_VALUE_FULL_INFORMATION *info = (KEY_VALUE_FULL_INFORMATION *)buffer;
static const int info_size = (char *)info->Name - (char *)info;
static const int info_size = offsetof( KEY_VALUE_FULL_INFORMATION, Name );
TRACE("(%x,%ld,%p,%p,%p,%p,%p,%p)\n",
hkey, index, value, val_count, reserved, type, data, count );
@ -1121,7 +1121,7 @@ DWORD WINAPI RegEnumValueA( HKEY hkey, DWORD index, LPSTR value, LPDWORD val_cou
DWORD total_size;
char buffer[256], *buf_ptr = buffer;
KEY_VALUE_FULL_INFORMATION *info = (KEY_VALUE_FULL_INFORMATION *)buffer;
static const int info_size = (char *)info->Name - (char *)info;
static const int info_size = offsetof( KEY_VALUE_FULL_INFORMATION, Name );
TRACE("(%x,%ld,%p,%p,%p,%p,%p,%p)\n",
hkey, index, value, val_count, reserved, type, data, count );

View file

@ -388,7 +388,7 @@ DWORD WINAPI RegQueryValueExA( HKEY hkey, LPCSTR name, LPDWORD reserved, LPDWORD
DWORD total_size;
char buffer[256], *buf_ptr = buffer;
KEY_VALUE_PARTIAL_INFORMATION *info = (KEY_VALUE_PARTIAL_INFORMATION *)buffer;
static const int info_size = info->Data - (UCHAR *)info;
static const int info_size = offsetof( KEY_VALUE_PARTIAL_INFORMATION, Data );
TRACE("(0x%x,%s,%p,%p,%p,%p=%ld)\n",
hkey, debugstr_a(name), reserved, type, data, count, count ? *count : 0 );
@ -500,7 +500,7 @@ DWORD WINAPI RegEnumValueA( HKEY hkey, DWORD index, LPSTR value, LPDWORD val_cou
DWORD total_size;
char buffer[256], *buf_ptr = buffer;
KEY_VALUE_FULL_INFORMATION *info = (KEY_VALUE_FULL_INFORMATION *)buffer;
static const int info_size = (char *)info->Name - (char *)info;
static const int info_size = offsetof( KEY_VALUE_FULL_INFORMATION, Name );
TRACE("(%x,%ld,%p,%p,%p,%p,%p,%p)\n",
hkey, index, value, val_count, reserved, type, data, count );