mirror of
https://github.com/php/php-src.git
synced 2025-08-15 13:38:49 +02:00
Fix Clang style nits (GH-17685)
This addresses all `-Wlogical-op-parentheses` and `-Wmissing-braces` warnings across the whole code base (all Windows specific code).
This commit is contained in:
parent
dc7161cffe
commit
107bd080a5
10 changed files with 12 additions and 13 deletions
|
@ -137,8 +137,8 @@ PHPAPI int fnmatch(const char *pattern, const char *string, int flags)
|
|||
tolower((unsigned char)*string)))
|
||||
;
|
||||
else if ((flags & FNM_PREFIX_DIRS) && *string == EOS &&
|
||||
(c == '/' && string != stringstart ||
|
||||
string == stringstart+1 && *stringstart == '/') )
|
||||
((c == '/' && string != stringstart) ||
|
||||
(string == stringstart+1 && *stringstart == '/')))
|
||||
return (0);
|
||||
else
|
||||
return (FNM_NOMATCH);
|
||||
|
|
|
@ -59,7 +59,7 @@ DIR *opendir(const char *dir)
|
|||
wcscpy(filespecw, resolvedw);
|
||||
index = resolvedw_len - 1;
|
||||
}
|
||||
if (index >= 0 && filespecw[index] == L'/' || index == 0 && filespecw[index] == L'\\')
|
||||
if ((index >= 0 && filespecw[index] == L'/') || (index == 0 && filespecw[index] == L'\\'))
|
||||
filespecw[index] = L'\0';
|
||||
wcscat(filespecw, L"\\*");
|
||||
|
||||
|
|
|
@ -459,7 +459,7 @@ static zend_always_inline BOOL is_compatible(HMODULE handle, BOOL is_smaller, ch
|
|||
This check is to be extended as new VS versions come out. */
|
||||
DWORD core_minor = (DWORD)(PHP_LINKER_MINOR/10);
|
||||
DWORD comp_minor = (DWORD)(minor/10);
|
||||
if (14 == major && (is_smaller ? core_minor < comp_minor : core_minor > comp_minor) || PHP_LINKER_MAJOR != major)
|
||||
if ((14 == major && (is_smaller ? core_minor < comp_minor : core_minor > comp_minor)) || PHP_LINKER_MAJOR != major)
|
||||
#else
|
||||
if (PHP_LINKER_MAJOR != major)
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue