emacs/test/src
Paul Eggert 5d8bb14d3b Omit useless casts found by GCC 16
GCC 16’s -Wuseless-cast warning can be useful.
Fix the useless casts it identifies, and also fix false positives
by using compound literals, which are safer anyway than casts.
* src/composite.c (composition_adjust_point)
(Ffind_composition_internal):
* lwlib/xlwmenu.c (xlwMenuResources, xlwMenuClassRec)
(resource_widget_value, XlwMenuDestroy, Select):
* src/alloc.c (process_mark_stack):
* src/data.c (Faref):
* src/emacs-module.c (module_extract_big_integer):
* src/fileio.c (Finsert_file_contents):
* src/frame.h (FRAME_MESSAGE_BUF_SIZE):
* src/gtkutil.c (xg_tool_item_stale_p, update_frame_tool_bar):
* src/image.c (pbm_load, png_load_body, jpeg_load_body)
(tiff_load, gif_load):
* src/pdumper.c (ptrdiff_t_to_dump_off, dump_queue_dequeue)
(field_relpos, dump_field_emacs_ptr)
(dump_object_start_pseudovector, pdumper_remember_scalar_impl)
(pdumper_load, syms_of_pdumper):
* src/regex-emacs.c (BUF_PUSH, BUF_PUSH_2, POINTER_TO_OFFSET):
* src/xdisp.c (remember_mouse_glyph, pint2str):
* src/xterm.c (cvt_string_to_pixel, handle_one_xevent):
Omit useless casts.  Perhaps they were formerly needed,
but they should not be needed now.
* src/alloc.c (Fmemory_info):
* src/category.c (Fdefine_category, Fmodify_category_entry):
* src/data.c (Fash):
* src/dispextern.h (GLYPH_CODE_P):
* src/emacs.c (load_seccomp):
* src/fns.c (Flocale_info, maybe_resize_hash_table):
* src/indent.c (check_display_width):
* src/json.c (symset_size):
* src/lisp.h (XUNTAG, BOOL_VECTOR_LENGTH_MAX, obarray_size)
(hash_table_index_size):
* src/lread.c (make_obarray, grow_obarray, Fobarray_clear):
* src/menu.c (digest_single_submenu, x_popup_menu_1):
* src/term.c (init_tty):
* src/widget.c (update_wm_hints):
* src/xdisp.c (truncate_echo_area):
* src/xfns.c (x_set_border_pixel):
* src/xfont.c (xfont_match, xfont_open):
* src/xmenu.c (set_frame_menubar):
* test/src/emacs-module-resources/mod-test.c (emacs_module_init):
Use compound literal instead of a cast that is useless in
some platforms but not others.
* src/dispextern.h, src/haikugui.h, src/w32gui.h:
(WINDOW_HANDLE_UINTPTR): New macro.
* src/frame.c (gui_report_frame_params):
* src/xterm.c (x_try_cr_xlib_drawable):
Use it.
* src/lisp.h (XUNTAG): And tag with UINTPTR_MAX to pacify
gcc warning about a constant out of range.
(hash_idx_t): Make it int_least32_t, as it need not be exactly 32 bits.
(PRIdHASH_IDX): New macro.
* src/pdumper.c (dump_queue_dequeue): Use it.
* src/profiler.c (setup_cpu_timer): Make a local EMACS_INT
rather than int, to avoid need for casting later.
* src/syntax.c (uninitialized_interval):
Use 1u rather than 1 so the cast is always useful.
A compound literal wouldn’t do here, as this macro
needs to be an integer constant expression.
* src/xfns.c (XICCallback, XICProc): Remove macros.
(Xxic_preedit_start_callback): Use a cleaner way to specify it,
avoiding the need for type macros, and for a cast
if HAVE_XICCALLBACK_CALLBACK.
* src/xterm.c (handle_one_xevent): 2nd arg is now XEvent *
on all platforms, as there is no need to diverge, and
diverging meant we needed lots of unnecessary casts.
2026-05-26 21:57:19 -07:00
..
comp-resources Fix 'comp--func-unique-in-cu-p' to match docstring 2026-03-12 09:08:08 +01:00
emacs-module-resources Omit useless casts found by GCC 16 2026-05-26 21:57:19 -07:00
lread-resources Make force-load-doc-strings work again 2022-08-07 10:25:03 +02:00
regex-resources * src/regex-emacs.c (analyze_first): Fix incorrect optimization 2023-09-27 13:29:50 -04:00
syntax-resources Enhance syntax-tests.el to test nestable comments (Lisp style) 2020-11-17 16:51:49 +00:00
alloc-tests.el ; Add 2026 to copyright years. 2026-01-01 12:54:34 +00:00
buffer-tests.el ; Revert Eric's commits from February. 2026-05-07 15:29:53 +01:00
callint-tests.el ; Add 2026 to copyright years. 2026-01-01 12:54:34 +00:00
callproc-tests.el ; Add 2026 to copyright years. 2026-01-01 12:54:34 +00:00
casefiddle-tests.el Fix 'do_casify_natnum' for events with all flags set 2026-05-24 10:11:33 +00:00
character-tests.el ; Revert Eric's commits from February. 2026-05-07 15:29:53 +01:00
charset-tests.el ; Revert Eric's commits from February. 2026-05-07 15:29:53 +01:00
chartab-tests.el ; Revert Eric's commits from February. 2026-05-07 15:29:53 +01:00
cmds-tests.el Avoid crash in self-insert-command with non-ASCII auto-fill 2026-05-24 12:32:28 +00:00
coding-tests.el ; Revert Eric's commits from February. 2026-05-07 15:29:53 +01:00
comp-tests.el Fix 'comp--func-unique-in-cu-p' to match docstring 2026-03-12 09:08:08 +01:00
data-tests.el ; Revert Eric's commits from February. 2026-05-07 15:29:53 +01:00
decompress-tests.el ; Add 2026 to copyright years. 2026-01-01 12:54:34 +00:00
doc-tests.el ; Add 2026 to copyright years. 2026-01-01 12:54:34 +00:00
editfns-tests.el Fix off-by-one error in 'styled_format' 2026-05-24 09:23:05 +00:00
emacs-module-tests.el ; Revert Eric's commits from February. 2026-05-07 15:29:53 +01:00
emacs-tests.el ; Add 2026 to copyright years. 2026-01-01 12:54:34 +00:00
eval-tests.el ; Revert Eric's commits from February. 2026-05-07 15:29:53 +01:00
fileio-tests.el ; Revert Eric's commits from February. 2026-05-07 15:29:53 +01:00
filelock-tests.el test subdirectory: Use new error-API 2026-03-10 10:48:22 -04:00
floatfns-tests.el ; Revert Eric's commits from February. 2026-05-07 15:29:53 +01:00
fns-tests.el ; Revert Eric's commits from February. 2026-05-07 15:29:53 +01:00
font-tests.el ; Add 2026 to copyright years. 2026-01-01 12:54:34 +00:00
image-tests.el ; Add 2026 to copyright years. 2026-01-01 12:54:34 +00:00
indent-tests.el ; Add 2026 to copyright years. 2026-01-01 12:54:34 +00:00
inotify-tests.el ; Add 2026 to copyright years. 2026-01-01 12:54:34 +00:00
json-tests.el ; Add 2026 to copyright years. 2026-01-01 12:54:34 +00:00
keyboard-tests.el keyboard-tests.el: Try and fix the failure on EMBA 2026-05-13 11:10:15 -04:00
keymap-tests.el ; Revert Eric's commits from February. 2026-05-07 15:29:53 +01:00
lcms-tests.el ; Add 2026 to copyright years. 2026-01-01 12:54:34 +00:00
lread-tests.el ; Revert Eric's commits from February. 2026-05-07 15:29:53 +01:00
marker-tests.el ; Revert Eric's commits from February. 2026-05-07 15:29:53 +01:00
minibuf-tests.el ; Revert Eric's commits from February. 2026-05-07 15:29:53 +01:00
print-tests.el ; Revert Eric's commits from February. 2026-05-07 15:29:53 +01:00
process-tests.el ; Improve last change 2026-05-18 08:37:42 -07:00
profiler-tests.el ; Add 2026 to copyright years. 2026-01-01 12:54:34 +00:00
regex-emacs-tests.el ; Add 2026 to copyright years. 2026-01-01 12:54:34 +00:00
search-tests.el ; Add 2026 to copyright years. 2026-01-01 12:54:34 +00:00
sqlite-tests.el ; Add a test for sqlite-close 2026-05-02 14:20:42 +03:00
syntax-tests.el ; Add 2026 to copyright years. 2026-01-01 12:54:34 +00:00
terminal-tests.el Add predicate for initial_terminal 2026-03-26 15:19:56 +01:00
textprop-tests.el ; Add 2026 to copyright years. 2026-01-01 12:54:34 +00:00
thread-tests.el Fix signal calls where the data argument is not a list 2026-03-10 00:13:31 -04:00
timefns-tests.el ; Add 2026 to copyright years. 2026-01-01 12:54:34 +00:00
treesit-tests.el Fix tree-sitter embedded parser range 2026-04-27 02:14:49 -07:00
undo-tests.el ; Add 2026 to copyright years. 2026-01-01 12:54:34 +00:00
xdisp-tests.el ; Add 2026 to copyright years. 2026-01-01 12:54:34 +00:00
xfaces-tests.el ; Add 2026 to copyright years. 2026-01-01 12:54:34 +00:00
xml-tests.el ; Add 2026 to copyright years. 2026-01-01 12:54:34 +00:00