Files
Khem Raj 0f78ae56a7 dlt-daemon: Fix build with clang-23
clang 23 added -Wunused-but-set-global, enabled by -Wall, and the build
uses -Werror -Wfatal-errors, so this is now a hard failure:

  src/lib/dlt_user.c:132:20: fatal error: variable
    'dlt_user_housekeeper_exit_requested' set but not used
    [-Wunused-but-set-global]
    132 | static atomic_bool dlt_user_housekeeper_exit_requested = false;

The diagnostic is pointing at a real bug: dlt_user_atexit_handler() sets
the flag to "Signal housekeeper thread to exit", but nothing ever reads
it, so the housekeeper thread only ever stops when dlt_stop_threads()
cancels it. Not fixed upstream, master still has the same dead store.

Add a patch checking the flag in the housekeeper loop condition. Leaving
the loop that way is equivalent to being cancelled, pthread_cleanup_pop(1)
at the end of the function runs dlt_user_cleanup_handler() either way.

Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>
2026-09-11 07:07:58 -07:00
..