diff --git a/build_w32.bat b/build_w32.bat index da770223..17066d72 100755 --- a/build_w32.bat +++ b/build_w32.bat @@ -100,7 +100,7 @@ if not ERRORLEVEL 1 goto FoundMSVC call :FindVswhere if ERRORLEVEL 1 goto LegacyVS -for /f "tokens=* usebackq" %%i in (`%VSWHERE% -latest -property installationPath`) do ( +for /f "tokens=* usebackq" %%i in (`"%VSWHERE%" -latest -property installationPath`) do ( set InstallPath=%%i ) set "VSVARS=%InstallPath%\VC\Auxiliary\Build\vcvarsall.bat" @@ -404,10 +404,10 @@ goto :EOF :FindVswhere set VSWHERE=vswhere -%VSWHERE% -help >nul 2>&1 +"%VSWHERE%" -help >nul 2>&1 if not ERRORLEVEL 1 exit /b 0 set "VSWHERE=C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere" -%VSWHERE% -help >nul 2>&1 +"%VSWHERE%" -help >nul 2>&1 if ERRORLEVEL 1 exit /b 1 goto :EOF diff --git a/src/hash.c b/src/hash.c index 004097d0..beda7656 100644 --- a/src/hash.c +++ b/src/hash.c @@ -44,11 +44,11 @@ hash_init (struct hash_table *ht, unsigned long size, { ht->ht_size = round_up_2 (size); ht->ht_empty_slots = ht->ht_size; - ht->ht_vec = (void**) CALLOC (struct token *, ht->ht_size); + ht->ht_vec = CALLOC (void *, ht->ht_size); if (ht->ht_vec == 0) { fprintf (stderr, _("can't allocate %lu bytes for hash table: memory exhausted"), - ht->ht_size * (unsigned long) sizeof (struct token *)); + ht->ht_size * (unsigned long) sizeof (void *)); exit (MAKE_TROUBLE); } @@ -260,7 +260,7 @@ hash_rehash (struct hash_table *ht) ht->ht_capacity = ht->ht_size - (ht->ht_size >> 4); } ht->ht_rehashes++; - ht->ht_vec = (void **) CALLOC (struct token *, ht->ht_size); + ht->ht_vec = CALLOC (void *, ht->ht_size); for (ovp = old_vec; ovp < &old_vec[old_ht_size]; ovp++) { diff --git a/src/vpath.c b/src/vpath.c index d4e7dc73..caa09f04 100644 --- a/src/vpath.c +++ b/src/vpath.c @@ -277,7 +277,7 @@ construct_vpath_list (char *pattern, char *dirpath) entry, to where the nil-pointer terminator goes. Usually this is maxelem - 1. If not, shrink down. */ if (elem < (maxelem - 1)) - vpath = xrealloc (vpath, (elem+1) * sizeof (const char *)); + vpath = xrealloc ((void *)vpath, (elem+1) * sizeof (const char *)); /* Put the nil-pointer terminator on the end of the VPATH list. */ vpath[elem] = NULL;