aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEli Zaretskii2017-09-08 11:00:34 +0300
committerEli Zaretskii2017-09-08 11:00:34 +0300
commitbe90cd1412c89cae6b2ba41133b888008ee478dc (patch)
tree6ecafcc06f0f9dfca74f3e9615a3c092be1fcb95 /src
parente2a10d7fa8092ef51a3b61a363061e37224e2ca1 (diff)
downloademacs-be90cd1412c89cae6b2ba41133b888008ee478dc.tar.gz
emacs-be90cd1412c89cae6b2ba41133b888008ee478dc.zip
Avoid compiler warnings on MS-Windows with GCC 6 and 7
* src/w32font.c (SUBRANGE): Use unsigned arithmetic for bit-shifting, to avoid compiler warnings. (w32font_text_extents): Tell GCC NGLYPHS is non-negative, to avoid a warning. For details of the warning, see http://lists.gnu.org/archive/html/emacs-devel/2017-09/msg00093.html. * src/term.c (keys) [WINDOWSNT]: Don't define, as it is not used in that build. * src/sound.c (sound_perror): Ifdef away on WINDOWSNT, as this function is not used in that build. * configure.ac: Disable -Wsuggest-attribute=format on MS-Windows.
Diffstat (limited to 'src')
-rw-r--r--src/sound.c3
-rw-r--r--src/term.c2
-rw-r--r--src/w32font.c3
3 files changed, 4 insertions, 4 deletions
diff --git a/src/sound.c b/src/sound.c
index 4714ac1796b..75c27a97f4d 100644
--- a/src/sound.c
+++ b/src/sound.c
@@ -293,6 +293,7 @@ static int do_play_sound (const char *, unsigned long);
293 293
294/* BEGIN: Common functions */ 294/* BEGIN: Common functions */
295 295
296#ifndef WINDOWSNT
296/* Like perror, but signals an error. */ 297/* Like perror, but signals an error. */
297 298
298static _Noreturn void 299static _Noreturn void
@@ -315,8 +316,6 @@ sound_perror (const char *msg)
315 error ("%s", msg); 316 error ("%s", msg);
316} 317}
317 318
318
319#ifndef WINDOWSNT
320/* Display a warning message. */ 319/* Display a warning message. */
321 320
322static void 321static void
diff --git a/src/term.c b/src/term.c
index 87a412666d0..c1d7b0483e7 100644
--- a/src/term.c
+++ b/src/term.c
@@ -1210,6 +1210,7 @@ struct fkey_table {
1210 const char *cap, *name; 1210 const char *cap, *name;
1211}; 1211};
1212 1212
1213#ifndef DOS_NT
1213 /* Termcap capability names that correspond directly to X keysyms. 1214 /* Termcap capability names that correspond directly to X keysyms.
1214 Some of these (marked "terminfo") aren't supplied by old-style 1215 Some of these (marked "terminfo") aren't supplied by old-style
1215 (Berkeley) termcap entries. They're listed in X keysym order; 1216 (Berkeley) termcap entries. They're listed in X keysym order;
@@ -1313,7 +1314,6 @@ static const struct fkey_table keys[] =
1313 {"!3", "S-undo"} /*shifted undo key*/ 1314 {"!3", "S-undo"} /*shifted undo key*/
1314 }; 1315 };
1315 1316
1316#ifndef DOS_NT
1317static char **term_get_fkeys_address; 1317static char **term_get_fkeys_address;
1318static KBOARD *term_get_fkeys_kboard; 1318static KBOARD *term_get_fkeys_kboard;
1319static Lisp_Object term_get_fkeys_1 (void); 1319static Lisp_Object term_get_fkeys_1 (void);
diff --git a/src/w32font.c b/src/w32font.c
index 314d7acdcc6..98811192029 100644
--- a/src/w32font.c
+++ b/src/w32font.c
@@ -544,6 +544,7 @@ w32font_text_extents (struct font *font, unsigned *code,
544 information. */ 544 information. */
545 545
546 /* Make array big enough to hold surrogates. */ 546 /* Make array big enough to hold surrogates. */
547 eassume (0 <= nglyphs); /* pacify GCC warning on next line */
547 wcode = alloca (nglyphs * sizeof (WORD) * 2); 548 wcode = alloca (nglyphs * sizeof (WORD) * 2);
548 for (i = 0; i < nglyphs; i++) 549 for (i = 0; i < nglyphs; i++)
549 { 550 {
@@ -2188,7 +2189,7 @@ font_supported_scripts (FONTSIGNATURE * sig)
2188 2189
2189 /* Match a single subrange. SYM is set if bit N is set in subranges. */ 2190 /* Match a single subrange. SYM is set if bit N is set in subranges. */
2190#define SUBRANGE(n,sym) \ 2191#define SUBRANGE(n,sym) \
2191 if (subranges[(n) / 32] & (1 << ((n) % 32))) \ 2192 if (subranges[(n) / 32] & (1U << ((n) % 32))) \
2192 supported = Fcons ((sym), supported) 2193 supported = Fcons ((sym), supported)
2193 2194
2194 /* Match multiple subranges. SYM is set if any MASK bit is set in 2195 /* Match multiple subranges. SYM is set if any MASK bit is set in