Hi! The function has assert (htab_find) with a comment that that is to avoid -Wunused-function warning. The problem is that it triggers a different warning, ../../../libgomp/plugin/build-target-indirect-htab.h:68:3: warning: the address of ‘htab_find’ will always evaluate as ‘true’ (or error depending on exact flags).
This uses (void) htab_find instead to avoid any diagnostics. Tested on x86_64-linux, powerpc64le-linux and aarch64-linux, committed to trunk. 2025-12-15 Jakub Jelinek <[email protected]> * plugin/build-target-indirect-htab.h (create_target_indirect_map): Use (void) htab_find instead of assert (htab_find) to silence -Werror=unused-function because the latter triggers -Werror=address. --- libgomp/plugin/build-target-indirect-htab.h.jj 2025-09-17 09:03:28.934357899 +0200 +++ libgomp/plugin/build-target-indirect-htab.h 2025-12-15 16:11:51.894866968 +0100 @@ -65,7 +65,7 @@ void* create_target_indirect_map (size_t *h_size, size_t count, uint64_t *host_addrs, uint64_t *device_addrs) { - assert (htab_find); /* Silence -Werror=unused-function. */ + (void) htab_find; /* Silence -Werror=unused-function. */ htab_t indirect_htab = htab_create (count); Jakub
