diff options
| author | Eli Zaretskii | 2017-06-14 19:09:21 +0300 |
|---|---|---|
| committer | Eli Zaretskii | 2017-06-14 19:09:21 +0300 |
| commit | ab4f0326b49e9c5a733b9e773b364f9b4afb1efc (patch) | |
| tree | c8857e72b7af4596cdbe9aa3b2c86eb731f3b739 /src | |
| parent | 164fcc6f26e4a539f6cb1e4b7196ce5f93d06a53 (diff) | |
| download | emacs-ab4f0326b49e9c5a733b9e773b364f9b4afb1efc.tar.gz emacs-ab4f0326b49e9c5a733b9e773b364f9b4afb1efc.zip | |
Avoid compiler warning in image.c on MS-Windows
* src/image.c (x_create_x_image_and_pixmap) [HAVE_NTGUI]: Avoid
compilation warning under -Warray-bounds by temporarily disabling
the -Warray-bounds option.
Diffstat (limited to 'src')
| -rw-r--r-- | src/image.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/image.c b/src/image.c index 429777ce511..aedec7954ee 100644 --- a/src/image.c +++ b/src/image.c | |||
| @@ -2041,10 +2041,20 @@ x_create_x_image_and_pixmap (struct frame *f, int width, int height, int depth, | |||
| 2041 | (*ximg)->info.bmiColors[0].rgbGreen = 0; | 2041 | (*ximg)->info.bmiColors[0].rgbGreen = 0; |
| 2042 | (*ximg)->info.bmiColors[0].rgbRed = 0; | 2042 | (*ximg)->info.bmiColors[0].rgbRed = 0; |
| 2043 | (*ximg)->info.bmiColors[0].rgbReserved = 0; | 2043 | (*ximg)->info.bmiColors[0].rgbReserved = 0; |
| 2044 | /* bmiColors is a variable-length array declared by w32api | ||
| 2045 | headers as bmiColors[1], which triggers a warning under | ||
| 2046 | -Warray-bounds; shut that up. */ | ||
| 2047 | # if GNUC_PREREQ (4, 4, 0) | ||
| 2048 | # pragma GCC push_options | ||
| 2049 | # pragma GCC diagnostic ignored "-Warray-bounds" | ||
| 2050 | # endif | ||
| 2044 | (*ximg)->info.bmiColors[1].rgbBlue = 255; | 2051 | (*ximg)->info.bmiColors[1].rgbBlue = 255; |
| 2045 | (*ximg)->info.bmiColors[1].rgbGreen = 255; | 2052 | (*ximg)->info.bmiColors[1].rgbGreen = 255; |
| 2046 | (*ximg)->info.bmiColors[1].rgbRed = 255; | 2053 | (*ximg)->info.bmiColors[1].rgbRed = 255; |
| 2047 | (*ximg)->info.bmiColors[1].rgbReserved = 0; | 2054 | (*ximg)->info.bmiColors[1].rgbReserved = 0; |
| 2055 | # if GNUC_PREREQ (4, 4, 0) | ||
| 2056 | # pragma GCC pop_options | ||
| 2057 | # endif | ||
| 2048 | } | 2058 | } |
| 2049 | 2059 | ||
| 2050 | hdc = get_frame_dc (f); | 2060 | hdc = get_frame_dc (f); |