aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorNeil <nyamatongwe@gmail.com>2018-03-31 12:09:04 +1100
committerNeil <nyamatongwe@gmail.com>2018-03-31 12:09:04 +1100
commitf1398be0f55048ed2ef0ec8b51e376df694d4a70 (patch)
tree56e5740cfb804810ab878bc23c782bff1070d87d
parentb868c247fe132b8450a6a37fad2b7f0f355030fe (diff)
downloadscintilla-mirror-f1398be0f55048ed2ef0ec8b51e376df694d4a70.tar.gz
Match struct initialization exactly to declaration to avoid warnings from clang.
-rw-r--r--win32/PlatWin.cxx8
1 files changed, 5 insertions, 3 deletions
diff --git a/win32/PlatWin.cxx b/win32/PlatWin.cxx
index 79970a969..2eab32b60 100644
--- a/win32/PlatWin.cxx
+++ b/win32/PlatWin.cxx
@@ -771,7 +771,8 @@ void SurfaceGDI::AlphaRectangle(PRectangle rc, int cornerSize, ColourDesired fil
int height = static_cast<int>(rc.Height());
// Ensure not distorted too much by corners when small
cornerSize = std::min(cornerSize, (std::min(width, height) / 2) - 2);
- BITMAPINFO bpih = {{sizeof(BITMAPINFOHEADER), width, height, 1, 32, BI_RGB, 0, 0, 0, 0, 0}};
+ const BITMAPINFO bpih = {{sizeof(BITMAPINFOHEADER), width, height, 1, 32, BI_RGB, 0, 0, 0, 0, 0},
+ {{0, 0, 0, 0}}};
void *image = 0;
HBITMAP hbmMem = CreateDIBSection(hMemDC, &bpih,
DIB_RGB_COLORS, &image, NULL, 0);
@@ -833,7 +834,8 @@ void SurfaceGDI::DrawRGBAImage(PRectangle rc, int width, int height, const unsig
rc.top += static_cast<int>((rc.Height() - height) / 2);
rc.bottom = rc.top + height;
- BITMAPINFO bpih = {{sizeof(BITMAPINFOHEADER), width, height, 1, 32, BI_RGB, 0, 0, 0, 0, 0}};
+ const BITMAPINFO bpih = {{sizeof(BITMAPINFOHEADER), width, height, 1, 32, BI_RGB, 0, 0, 0, 0, 0},
+ {{0, 0, 0, 0}}};
unsigned char *image = 0;
HBITMAP hbmMem = CreateDIBSection(hMemDC, &bpih,
DIB_RGB_COLORS, reinterpret_cast<void **>(&image), NULL, 0);
@@ -1777,7 +1779,7 @@ void Window::SetPosition(PRectangle rc) {
}
static RECT RectFromMonitor(HMONITOR hMonitor) {
- MONITORINFO mi = {0};
+ MONITORINFO mi = {};
mi.cbSize = sizeof(mi);
if (GetMonitorInfo(hMonitor, &mi)) {
return mi.rcWork;