diff options
| author | Paul Eggert | 2016-03-15 13:47:47 -0700 |
|---|---|---|
| committer | Paul Eggert | 2016-03-15 13:49:58 -0700 |
| commit | 7950e1dd3fc1ce07cc4d6001de6c11a249b80de8 (patch) | |
| tree | 75e155ac82d6297a7a42d3116f6028a1b807cd46 /src | |
| parent | 218ae59019204311101b1d6f79c86f8815b3a65b (diff) | |
| download | emacs-7950e1dd3fc1ce07cc4d6001de6c11a249b80de8.tar.gz emacs-7950e1dd3fc1ce07cc4d6001de6c11a249b80de8.zip | |
Port to clang 3.7.0 on x86-64
* configure.ac: Use AS_IF so that gl_WARN_ADD’s prerequisites are
not done conditionally. This helps clang, which needs
-Wunknown-warning-option later when configured with warnings.
* src/editfns.c (invalid_time): Now _Noreturn, since clang isn’t
smart enough to figure this out on its own if warnings are enabled.
(lisp_time_struct): Redo for clarity, and to pacify clang.
* src/xfns.c (x_real_pos_and_offsets) [USE_XCB]: Don’t use
uninitialized locals. This avoids undefined behavior and pacifies
clang.
Diffstat (limited to 'src')
| -rw-r--r-- | src/editfns.c | 6 | ||||
| -rw-r--r-- | src/xfns.c | 2 |
2 files changed, 5 insertions, 3 deletions
diff --git a/src/editfns.c b/src/editfns.c index df982234977..2ac0537eddb 100644 --- a/src/editfns.c +++ b/src/editfns.c | |||
| @@ -1456,7 +1456,7 @@ time_overflow (void) | |||
| 1456 | error ("Specified time is not representable"); | 1456 | error ("Specified time is not representable"); |
| 1457 | } | 1457 | } |
| 1458 | 1458 | ||
| 1459 | static void | 1459 | static _Noreturn void |
| 1460 | invalid_time (void) | 1460 | invalid_time (void) |
| 1461 | { | 1461 | { |
| 1462 | error ("Invalid time specification"); | 1462 | error ("Invalid time specification"); |
| @@ -1848,7 +1848,9 @@ lisp_time_struct (Lisp_Object specified_time, int *plen) | |||
| 1848 | Lisp_Object high, low, usec, psec; | 1848 | Lisp_Object high, low, usec, psec; |
| 1849 | struct lisp_time t; | 1849 | struct lisp_time t; |
| 1850 | int len = disassemble_lisp_time (specified_time, &high, &low, &usec, &psec); | 1850 | int len = disassemble_lisp_time (specified_time, &high, &low, &usec, &psec); |
| 1851 | int val = len ? decode_time_components (high, low, usec, psec, &t, 0) : 0; | 1851 | if (!len) |
| 1852 | invalid_time (); | ||
| 1853 | int val = decode_time_components (high, low, usec, psec, &t, 0); | ||
| 1852 | check_time_validity (val); | 1854 | check_time_validity (val); |
| 1853 | *plen = len; | 1855 | *plen = len; |
| 1854 | return t; | 1856 | return t; |
diff --git a/src/xfns.c b/src/xfns.c index 0a4a09ef285..b22af5c830d 100644 --- a/src/xfns.c +++ b/src/xfns.c | |||
| @@ -273,7 +273,7 @@ x_real_pos_and_offsets (struct frame *f, | |||
| 273 | XFree (tmp_children); | 273 | XFree (tmp_children); |
| 274 | #endif | 274 | #endif |
| 275 | 275 | ||
| 276 | if (wm_window == rootw || had_errors) | 276 | if (had_errors || wm_window == rootw) |
| 277 | break; | 277 | break; |
| 278 | 278 | ||
| 279 | win = wm_window; | 279 | win = wm_window; |