]> git.eshelyaron.com Git - emacs.git/commit
Prefer static_assert to verify
authorStefan Kangas <stefankangas@gmail.com>
Tue, 23 Jul 2024 22:09:49 +0000 (00:09 +0200)
committerEshel Yaron <me@eshelyaron.com>
Thu, 22 Aug 2024 07:27:25 +0000 (09:27 +0200)
commit910ea313408dd26f97dbddf3305d8ad859095cd9
tree455fb51399acd7ad08ea4ed4fc7f9b6c716dbe52
parentcc75772c8beaf6d15a15339df10bfae3953da211
Prefer static_assert to verify

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 (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.

(cherry picked from commit 7c8e28607b78b371598df58de96c3c3362ad6002)
32 files changed:
lib-src/asset-directory-tool.c
src/alloc.c
src/android.c
src/android.h
src/androidfont.c
src/androidvfs.c
src/bidi.c
src/buffer.c
src/casefiddle.c
src/character.h
src/decompress.c
src/dispnew.c
src/editfns.c
src/emacs-module.c
src/eval.c
src/fileio.c
src/fns.c
src/fringe.c
src/keyboard.h
src/keymap.c
src/lisp.h
src/lread.c
src/nsgui.h
src/pdumper.c
src/process.c
src/regex-emacs.c
src/sort.c
src/sysdep.c
src/thread.c
src/timefns.c
src/unexelf.c
src/xterm.c