diff options
| author | Stefan Kangas | 2024-07-24 00:09:49 +0200 |
|---|---|---|
| committer | Stefan Kangas | 2024-07-24 00:11:37 +0200 |
| commit | e25655756315ac398d15b308511a8e9abf20bb0e (patch) | |
| tree | 3e81a7dc0ab9abcfb9364b96f0f10559e61aef66 /src/editfns.c | |
| parent | 19a18e487b8e2f0c1627b9cc98e601327e884eb2 (diff) | |
| download | emacs-scratch/static_assert.tar.gz emacs-scratch/static_assert.zip | |
Prefer static_assert to verifyscratch/static_assert
Although static_assert is C11-specific, and Emacs remains on C99, it
has been backported to older compilers by Gnulib. Gnulib has already
changed to prefer static_assert, and we can do the same.
* lib-src/asset-directory-tool.c (main_2):
* src/alloc.c (BLOCK_ALIGN, aligned_alloc, lisp_align_malloc)
(vectorlike_nbytes, allocate_pseudovector):
* src/android.c (android_globalize_reference, android_set_dashes):
* src/android.h:
* src/androidfont.c (androidfont_draw, androidfont_text_extents):
* src/androidvfs.c:
* src/bidi.c (BIDI_CACHE_MAX_ELTS_PER_SLOT)
(bidi_find_bracket_pairs):
* src/buffer.c (init_buffer_once):
* src/casefiddle.c (do_casify_multibyte_string):
* src/dispnew.c (scrolling_window, scrolling):
* src/editfns.c (styled_format):
* src/emacs-module.c (module_extract_big_integer):
* src/fileio.c (Fdo_auto_save):
* src/fns.c (next_almost_prime, hash_string):
* src/fringe.c (init_fringe):
* src/keyboard.h (kbd_buffer_store_event_hold):
* src/keymap.c:
* src/lisp.h (u, memclear, reduce_emacs_uint_to_hash_hash)
(modiff_incr):
* src/lread.c (skip_lazy_string):
* src/pdumper.c (dump_bignum, Fdump_emacs_portable)
(dump_do_dump_relocation, pdumper_load):
* src/process.c (make_process, Fmake_process)
(connect_network_socket):
* src/regex-emacs.c:
* src/sort.c (tim_sort):
* src/sysdep.c (init_random, SSIZE_MAX):
* src/thread.c:
* src/timefns.c (trillion_factor):
* src/unexelf.c:
* src/xterm.c (x_send_scroll_bar_event): Prefer static_assert to Gnulib
verify. Remove import of verify.h, except when used for other reasons.
Diffstat (limited to 'src/editfns.c')
| -rw-r--r-- | src/editfns.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/editfns.c b/src/editfns.c index 6b110b3d0e0..07fe3c68da0 100644 --- a/src/editfns.c +++ b/src/editfns.c | |||
| @@ -46,7 +46,6 @@ along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>. */ | |||
| 46 | #include <c-ctype.h> | 46 | #include <c-ctype.h> |
| 47 | #include <intprops.h> | 47 | #include <intprops.h> |
| 48 | #include <stdlib.h> | 48 | #include <stdlib.h> |
| 49 | #include <verify.h> | ||
| 50 | 49 | ||
| 51 | #include "composite.h" | 50 | #include "composite.h" |
| 52 | #include "intervals.h" | 51 | #include "intervals.h" |
| @@ -3408,7 +3407,7 @@ styled_format (ptrdiff_t nargs, Lisp_Object *args, bool message) | |||
| 3408 | SPRINTF_BUFSIZE = (sizeof "-." + (LDBL_MAX_10_EXP + 1) | 3407 | SPRINTF_BUFSIZE = (sizeof "-." + (LDBL_MAX_10_EXP + 1) |
| 3409 | + USEFUL_PRECISION_MAX) | 3408 | + USEFUL_PRECISION_MAX) |
| 3410 | }; | 3409 | }; |
| 3411 | verify (USEFUL_PRECISION_MAX > 0); | 3410 | static_assert (USEFUL_PRECISION_MAX > 0); |
| 3412 | 3411 | ||
| 3413 | ptrdiff_t n; /* The number of the next arg to substitute. */ | 3412 | ptrdiff_t n; /* The number of the next arg to substitute. */ |
| 3414 | char initial_buffer[1000 + SPRINTF_BUFSIZE]; | 3413 | char initial_buffer[1000 + SPRINTF_BUFSIZE]; |