Francois Gouget wrote:
On Mon, 26 Jul 2004, Robert Shearman wrote: [...]
size = sizeof(buffer);
- if (!RegQueryValueExA(hKey, "Drivers", 0, &type, (LPVOID)buffer, &size)) {
- BOOL keyQueried = !RegQueryValueExA(hKey, "Drivers", 0, &type,
^^^^ - all variable declarations must be done at the very
start of a block of code.
Actually this is the start of a block of code since the character preceeding 'BOOL' is '{'.
Not quite. After applying the patch, this is what you get:
/************************************************************************** * MMDRV_InitFromRegistry [internal] */ static BOOL MMDRV_InitFromRegistry(void) { HKEY hKey; char buffer[256]; char* p1; char* p2; DWORD type, size; BOOL ret = FALSE; TRACE("()\n");
if (RegCreateKeyA(HKEY_LOCAL_MACHINE, "Software\Wine\Wine\Config\WinMM", &hKey)) { TRACE("Cannot open WinMM config key\n"); return FALSE; }
size = sizeof(buffer); BOOL keyQueried = !RegQueryValueExA(hKey, "Drivers", 0, &type, (LPVOID)buffer, &size);