gnu.emacs/lwlib
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
..
ChangeLog.1 ; Add 2026 to copyright years. 2026-01-01 12:54:34 +00:00
COPYING Merge from Gnulib 2017-10-01 18:31:10 -07:00
deps.mk ; Add 2026 to copyright years. 2026-01-01 12:54:34 +00:00
lwlib-int.h ; Add 2026 to copyright years. 2026-01-01 12:54:34 +00:00
lwlib-utils.c ; Add 2026 to copyright years. 2026-01-01 12:54:34 +00:00
lwlib-utils.h Don't link libXft when using cairo 2019-04-24 12:31:37 +09:00
lwlib-widget.h ; Add 2026 to copyright years. 2026-01-01 12:54:34 +00:00
lwlib-Xaw.c butttonTrans need not be extern 2026-02-08 17:02:55 -08:00
lwlib-Xaw.h More porting to GCC 8 of --enable-gcc-warnings 2018-12-17 08:16:17 -08:00
lwlib-Xlw.c ; Add 2026 to copyright years. 2026-01-01 12:54:34 +00:00
lwlib-Xlw.h More porting to GCC 8 of --enable-gcc-warnings 2018-12-17 08:16:17 -08:00
lwlib-Xm.c ; Add 2026 to copyright years. 2026-01-01 12:54:34 +00:00
lwlib-Xm.h Prefer HTTPS to FTP and HTTP in documentation 2017-09-13 15:54:37 -07:00
lwlib.c Avoid a memset in allocate_widget_instance 2026-05-23 19:18:53 -07:00
lwlib.h ; Add 2026 to copyright years. 2026-01-01 12:54:34 +00:00
Makefile.in ; Add 2026 to copyright years. 2026-01-01 12:54:34 +00:00
README Generate a ChangeLog file from commit logs 2015-04-07 00:00:55 -07:00
xlwmenu.c Omit useless casts found by GCC 16 2026-05-26 21:57:19 -07:00
xlwmenu.h ; Add 2026 to copyright years. 2026-01-01 12:54:34 +00:00
xlwmenuP.h ; Add 2026 to copyright years. 2026-01-01 12:54:34 +00:00

This subdirectory contains the Lucid Widget Library (lwlib), which
provides a uniform interface to a few different X toolkits.  The
library was written by Lucid, Inc and released under the terms of the
GPL version 1 (or later).  It is not considered part of GNU Emacs.

This version of the library differs from the original as described in
the ChangeLog.1 file.