diff options
| author | Paul Eggert | 2017-09-09 11:10:35 -0700 |
|---|---|---|
| committer | Paul Eggert | 2017-09-09 11:11:51 -0700 |
| commit | d63123542ffd60dbec0c9038144329b99f0f1d65 (patch) | |
| tree | 8338da31228034a2e5db48e8e0840d0d126e51ed /src/tparam.c | |
| parent | 715f0835b5a0c17f2fcb43d1e75d55adce1639a5 (diff) | |
| download | emacs-d63123542ffd60dbec0c9038144329b99f0f1d65.tar.gz emacs-d63123542ffd60dbec0c9038144329b99f0f1d65.zip | |
Improve --enable-gcc-warnings for MinGW64
This partially reverts my 2016-05-30 patch. Apparently MinGW64
still requires pacifications that GCC 7.1.1 x86-64 (Fedora 26)
does not. Also, pacify tparam.c, which isn’t used on Fedora.
* lib-src/etags.c (process_file_name, TeX_commands):
* src/buffer.c (fix_overlays_before):
* src/data.c (Fmake_variable_buffer_local, cons_to_unsigned)
(cons_to_signed):
* src/editfns.c (Ftranslate_region_internal):
Prefer UNINIT to some stray value, as this simplifies
code-reading later.
* src/eval.c (CACHEABLE): New macro.
(internal_lisp_condition_case): Use it.
* src/tparam.c (tparam1): Use FALLTHROUGH to pacify GCC.
Diffstat (limited to 'src/tparam.c')
| -rw-r--r-- | src/tparam.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/tparam.c b/src/tparam.c index 7a4adc2dc94..92fa5b19df7 100644 --- a/src/tparam.c +++ b/src/tparam.c | |||
| @@ -125,6 +125,7 @@ tparam1 (const char *string, char *outstring, int len, | |||
| 125 | goto onedigit; | 125 | goto onedigit; |
| 126 | if (tem < 100) | 126 | if (tem < 100) |
| 127 | goto twodigit; | 127 | goto twodigit; |
| 128 | FALLTHROUGH; | ||
| 128 | case '3': /* %3 means output in decimal, 3 digits. */ | 129 | case '3': /* %3 means output in decimal, 3 digits. */ |
| 129 | if (tem > 999) | 130 | if (tem > 999) |
| 130 | { | 131 | { |
| @@ -132,6 +133,7 @@ tparam1 (const char *string, char *outstring, int len, | |||
| 132 | tem %= 1000; | 133 | tem %= 1000; |
| 133 | } | 134 | } |
| 134 | *op++ = tem / 100 + '0'; | 135 | *op++ = tem / 100 + '0'; |
| 136 | FALLTHROUGH; | ||
| 135 | case '2': /* %2 means output in decimal, 2 digits. */ | 137 | case '2': /* %2 means output in decimal, 2 digits. */ |
| 136 | twodigit: | 138 | twodigit: |
| 137 | tem %= 100; | 139 | tem %= 100; |
| @@ -140,10 +142,12 @@ tparam1 (const char *string, char *outstring, int len, | |||
| 140 | *op++ = tem % 10 + '0'; | 142 | *op++ = tem % 10 + '0'; |
| 141 | argp++; | 143 | argp++; |
| 142 | break; | 144 | break; |
| 145 | |||
| 143 | case 'p': /* %pN means use param N for next subst. */ | 146 | case 'p': /* %pN means use param N for next subst. */ |
| 144 | tem = fixed_argp[(*p++) - '1']; | 147 | tem = fixed_argp[(*p++) - '1']; |
| 145 | explicit_param_p = true; | 148 | explicit_param_p = true; |
| 146 | break; | 149 | break; |
| 150 | |||
| 147 | case 'C': | 151 | case 'C': |
| 148 | /* For c-100: print quotient of value by 96, if nonzero, | 152 | /* For c-100: print quotient of value by 96, if nonzero, |
| 149 | then do like %+. */ | 153 | then do like %+. */ |
| @@ -152,8 +156,10 @@ tparam1 (const char *string, char *outstring, int len, | |||
| 152 | *op++ = tem / 96; | 156 | *op++ = tem / 96; |
| 153 | tem %= 96; | 157 | tem %= 96; |
| 154 | } | 158 | } |
| 159 | FALLTHROUGH; | ||
| 155 | case '+': /* %+x means add character code of char x. */ | 160 | case '+': /* %+x means add character code of char x. */ |
| 156 | tem += *p++; | 161 | tem += *p++; |
| 162 | FALLTHROUGH; | ||
| 157 | case '.': /* %. means output as character. */ | 163 | case '.': /* %. means output as character. */ |
| 158 | if (left) | 164 | if (left) |
| 159 | { | 165 | { |
| @@ -173,6 +179,7 @@ tparam1 (const char *string, char *outstring, int len, | |||
| 173 | } | 179 | } |
| 174 | } | 180 | } |
| 175 | *op++ = tem ? tem : 0200; | 181 | *op++ = tem ? tem : 0200; |
| 182 | FALLTHROUGH; | ||
| 176 | case 'f': /* %f means discard next arg. */ | 183 | case 'f': /* %f means discard next arg. */ |
| 177 | argp++; | 184 | argp++; |
| 178 | break; | 185 | break; |