]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Remove cast from captured_main
authorTom Tromey <tromey@adacore.com>
Wed, 13 Aug 2025 18:08:59 +0000 (12:08 -0600)
committerTom Tromey <tromey@adacore.com>
Wed, 13 Aug 2025 18:08:59 +0000 (12:08 -0600)
captured_main takes a 'void *', but then immediately casts it to the
correct type.  There's no reason for this any more, the caller passes
in the correct type.  This patch cleans this up.  Tested by
rebuilding.

gdb/main.c

index bb8ddc37c010bbdfc9ccb2c4dd3c21522d1e3001..8c5ef99f8190ae535776680767180a0cdb66b349 100644 (file)
@@ -1330,10 +1330,8 @@ captured_main_1 (struct captured_main_args *context)
 }
 
 static void
-captured_main (void *data)
+captured_main (captured_main_args *context)
 {
-  struct captured_main_args *context = (struct captured_main_args *) data;
-
   captured_main_1 (context);
 
   /* NOTE: cagney/1999-11-07: There is probably no reason for not