mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00
Address more Clang warnings (GH-17506)
We prefer clean solutions (such as declaring the proper type in the
first place, or introducing a portable format specifier) where easily
possible, but resort to casts otherwise.
We also port f1480ab14b
.
This commit is contained in:
parent
75bd1a9dc0
commit
aa76127d01
11 changed files with 20 additions and 20 deletions
|
@ -94,7 +94,7 @@ static int LoadDirectory(HashTable *directories, HKEY key, char *path, int path_
|
|||
memset(name, '\0', max_name+1);
|
||||
memset(value, '\0', max_value+1);
|
||||
|
||||
if (RegEnumValue(key, i, name, &name_len, NULL, &type, value, &value_len) == ERROR_SUCCESS) {
|
||||
if (RegEnumValue(key, i, name, &name_len, NULL, &type, (LPBYTE) value, &value_len) == ERROR_SUCCESS) {
|
||||
if ((type == REG_SZ) || (type == REG_EXPAND_SZ)) {
|
||||
zval data;
|
||||
|
||||
|
@ -287,7 +287,7 @@ char *GetIniPathFromRegistry()
|
|||
if (OpenPhpRegistryKey(NULL, &hKey)) {
|
||||
DWORD buflen = MAXPATHLEN;
|
||||
reg_location = emalloc(MAXPATHLEN+1);
|
||||
if(RegQueryValueEx(hKey, PHPRC_REGISTRY_NAME, 0, NULL, reg_location, &buflen) != ERROR_SUCCESS) {
|
||||
if(RegQueryValueEx(hKey, PHPRC_REGISTRY_NAME, 0, NULL, (LPBYTE) reg_location, &buflen) != ERROR_SUCCESS) {
|
||||
RegCloseKey(hKey);
|
||||
efree(reg_location);
|
||||
reg_location = NULL;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue