]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Ensure cooked_index_entry self-tests are run
authorTom Tromey <tromey@adacore.com>
Thu, 22 May 2025 16:46:50 +0000 (10:46 -0600)
committerTom Tromey <tromey@adacore.com>
Thu, 22 May 2025 16:48:11 +0000 (10:48 -0600)
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.

gdb/dwarf2/cooked-index-entry.c

index 52db8515e1fa7712066da1c2ef1c0bfa6a893b0b..9a921f22c21485d6a92431965451d72fd599456b 100644 (file)
@@ -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);