From 5ae01a686afde6bd22ade596a56e56f0f99a3afb Mon Sep 17 00:00:00 2001 From: cxl Date: Mon, 27 Apr 2020 16:48:38 +0000 Subject: [PATCH] Functions4U, SysInfo: Fixed CLANG warnings git-svn-id: svn://ultimatepp.org/upp/trunk@14391 f0d560ea-af0d-0410-9eb7-867de7ffcac7 --- bazaar/Functions4U/Functions4U.cpp | 2 +- bazaar/SysInfo/Battery.cpp | 2 +- bazaar/SysInfo/ScreenGrab.cpp | 2 +- bazaar/SysInfo/SysInfo.cpp | 2 +- bazaar/SysInfo/SysInfo.upp | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/bazaar/Functions4U/Functions4U.cpp b/bazaar/Functions4U/Functions4U.cpp index 5f39f00ee..8f1cb6a9f 100644 --- a/bazaar/Functions4U/Functions4U.cpp +++ b/bazaar/Functions4U/Functions4U.cpp @@ -1642,7 +1642,7 @@ bool RenameDeepWildcardsX(const char *path, const char *namewc, const char *newn } if (PatternMatch(namewc, name)) { if ((ff.IsFolder() && forfolder) || (ff.IsFile() && forfile)) { - if (!FileMoveX(full, AppendFileName(path, newname)), flags) + if (!FileMoveX(full, AppendFileName(path, newname), flags)) return false; } } diff --git a/bazaar/SysInfo/Battery.cpp b/bazaar/SysInfo/Battery.cpp index 56b124357..ddc5584bd 100644 --- a/bazaar/SysInfo/Battery.cpp +++ b/bazaar/SysInfo/Battery.cpp @@ -150,7 +150,7 @@ bool DriveOpenClose(String drive, bool open) return false; } HANDLE hDrive; - hDrive = CreateFile("\\\\.\\" + drive, GENERIC_READ || GENERIC_WRITE, FILE_SHARE_READ|FILE_SHARE_WRITE, 0, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, 0); + hDrive = CreateFile("\\\\.\\" + drive, GENERIC_READ|GENERIC_WRITE, FILE_SHARE_READ|FILE_SHARE_WRITE, 0, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, 0); if (hDrive == INVALID_HANDLE_VALUE) return false; bool ret = false; diff --git a/bazaar/SysInfo/ScreenGrab.cpp b/bazaar/SysInfo/ScreenGrab.cpp index 20068dc43..c392ea388 100644 --- a/bazaar/SysInfo/ScreenGrab.cpp +++ b/bazaar/SysInfo/ScreenGrab.cpp @@ -110,7 +110,7 @@ Image Window_SaveCapture(int64 windowId, int left, int top, int width, int heigh return Null; } if(bmi.bmiHeader.biSizeImage <= 0) - bmi.bmiHeader.biSizeImage = bmi.bmiHeader.biWidth*labs(bmi.bmiHeader.biHeight)* + bmi.bmiHeader.biSizeImage = bmi.bmiHeader.biWidth*abs(bmi.bmiHeader.biHeight)* (bmi.bmiHeader.biBitCount+7)/8; bmi.bmiHeader.biCompression = BI_RGB; bmi.bmiHeader.biHeight = -height; diff --git a/bazaar/SysInfo/SysInfo.cpp b/bazaar/SysInfo/SysInfo.cpp index 5119af7a3..cce42eb7d 100644 --- a/bazaar/SysInfo/SysInfo.cpp +++ b/bazaar/SysInfo/SysInfo.cpp @@ -1984,7 +1984,7 @@ void SetDesktopWallPaper(const char *path) void SetDesktopWallPaper(char *path) { - if (0 == SystemParametersInfo(SPI_SETDESKWALLPAPER, 0, static_cast(path), SPIF_UPDATEINIFILE || SPIF_SENDWININICHANGE)) + if (0 == SystemParametersInfo(SPI_SETDESKWALLPAPER, 0, static_cast(path), SPIF_UPDATEINIFILE|SPIF_SENDWININICHANGE)) throw Exc(String(t_("Impossible to change Desktop bitmap")) + ": " + AsString(GetLastError())); } #endif diff --git a/bazaar/SysInfo/SysInfo.upp b/bazaar/SysInfo/SysInfo.upp index 23e632016..890d71b6b 100644 --- a/bazaar/SysInfo/SysInfo.upp +++ b/bazaar/SysInfo/SysInfo.upp @@ -30,4 +30,4 @@ file SysInfo.t, Copying; - spellcheck_comments "EN-GB" + spellcheck_comments "EN-GB" \ No newline at end of file