diff options
| author | Paul Eggert | 2015-09-16 14:40:53 -0700 |
|---|---|---|
| committer | Paul Eggert | 2015-09-16 15:07:23 -0700 |
| commit | 8865587c55f251ac624e6730505de66d15b28562 (patch) | |
| tree | c9cb82c4a99d98df45ec5531c9d97338792c2680 /src/coding.c | |
| parent | 82198ed57e3059f0526658608fd22b5fc87ab734 (diff) | |
| download | emacs-8865587c55f251ac624e6730505de66d15b28562.tar.gz emacs-8865587c55f251ac624e6730505de66d15b28562.zip | |
Add -Wswitch to --enable-gcc-warnings
Make --enable-gcc-warnings a bit pickier, by also using -Wswitch.
* configure.ac (WERROR_CFLAGS): Don’t add -Wno-switch.
* lib-src/etags.c (main, consider_token, C_entries):
* src/coding.c (encode_invocation_designation):
* src/data.c (Ftype_of):
* src/eval.c (Fdefvaralias, default_toplevel_binding)
(Fbacktrace__locals, mark_specpdl):
* src/lisp.h (record_xmalloc):
* src/syntax.c (scan_lists, scan_sexps_forward):
* src/window.c (window_relative_x_coord):
* src/xdisp.c (push_it, pop_it):
* src/xterm.c (xg_scroll_callback, x_check_fullscreen):
Error out or do nothing (as appropriate) if a switch statement
with an enum value does not cover all of the enum.
* src/dispextern.h (struct iterator_stack_entry.u.comp):
Remove unused member discovered by using -Wswitch.
* src/lisp.h (record_xmalloc): Add a ‘+ 0’ to pacify -Wswitch.
* src/vm-limit.c (check_memory_limits):
Simplify warning-diagnostic computation by using a table.
Diffstat (limited to 'src/coding.c')
| -rw-r--r-- | src/coding.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/coding.c b/src/coding.c index 1544f319b00..d14e562ce9a 100644 --- a/src/coding.c +++ b/src/coding.c | |||
| @@ -4295,6 +4295,9 @@ encode_invocation_designation (struct charset *charset, | |||
| 4295 | else | 4295 | else |
| 4296 | ENCODE_LOCKING_SHIFT_3; | 4296 | ENCODE_LOCKING_SHIFT_3; |
| 4297 | break; | 4297 | break; |
| 4298 | |||
| 4299 | default: | ||
| 4300 | break; | ||
| 4298 | } | 4301 | } |
| 4299 | } | 4302 | } |
| 4300 | 4303 | ||
| @@ -7292,6 +7295,8 @@ produce_annotation (struct coding_system *coding, ptrdiff_t pos) | |||
| 7292 | case CODING_ANNOTATE_CHARSET_MASK: | 7295 | case CODING_ANNOTATE_CHARSET_MASK: |
| 7293 | produce_charset (coding, charbuf, pos); | 7296 | produce_charset (coding, charbuf, pos); |
| 7294 | break; | 7297 | break; |
| 7298 | default: | ||
| 7299 | break; | ||
| 7295 | } | 7300 | } |
| 7296 | charbuf += len; | 7301 | charbuf += len; |
| 7297 | } | 7302 | } |