From: Tom Tromey Date: Thu, 22 May 2025 16:46:50 +0000 (-0600) Subject: Ensure cooked_index_entry self-tests are run X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=2711e4754fc4d9ed594491d3e87a37d0ffa165ed;p=thirdparty%2Fbinutils-gdb.git Ensure cooked_index_entry self-tests are run While looking at code coverage for gdb, I noticed that the cooked_index_entry self-tests were not run. I tracked this down to a formatting error in cooked-index-entry.c. I suspect it might be better to use a macro to define these initialization functions. That would probably remove the possibility for this kind of error. --- diff --git a/gdb/dwarf2/cooked-index-entry.c b/gdb/dwarf2/cooked-index-entry.c index 52db8515e1f..9a921f22c21 100644 --- a/gdb/dwarf2/cooked-index-entry.c +++ b/gdb/dwarf2/cooked-index-entry.c @@ -234,7 +234,8 @@ cooked_index_entry::write_scope (struct obstack *storage, } void _initialize_dwarf2_entry (); -void _initialize_dwarf2_entry () +void +_initialize_dwarf2_entry () { #if GDB_SELF_TEST selftests::register_test ("cooked_index_entry::compare", test_compare);