[review,v2] infcall: remove unused parameter in 'value_arg_coerce'

Message ID 20191022071334.3133D23814@gnutoolchain-gerrit.osci.io
State New, archived
Headers

Commit Message

Simon Marchi (Code Review) Oct. 22, 2019, 7:13 a.m. UTC
  Change URL: https://gnutoolchain-gerrit.osci.io/r/c/binutils-gdb/+/140
......................................................................

infcall: remove unused parameter in 'value_arg_coerce'

Remove the unused SP parameter from the auxiliary function
'value_arg_coerce'.

gdb/ChangeLog:
2019-10-22  Tankut Baris Aktemur  <tankut.baris.aktemur@intel.com>

	* infcall.c (value_arg_coerce): Remove an unused parameter.
	(call_function_by_hand_dummy): Update the call to
	'value_arg_coerce'.

Change-Id: If324a1dda3fa5d4c145790b92bd3f656c00296f4
---
M gdb/ChangeLog
M gdb/infcall.c
2 files changed, 9 insertions(+), 5 deletions(-)
  

Patch

diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index fb15f2b..4ae0d03 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,11 @@ 
 2019-10-22  Tankut Baris Aktemur  <tankut.baris.aktemur@intel.com>
 
+	* infcall.c (value_arg_coerce): Remove an unused parameter.
+	(call_function_by_hand_dummy): Update the call to
+	'value_arg_coerce'.
+
+2019-10-22  Tankut Baris Aktemur  <tankut.baris.aktemur@intel.com>
+
 	* infcall.c (call_function_by_hand_dummy): Refactor.
 
 2019-10-21  Ali Tamur  <tamu@google.com>
diff --git a/gdb/infcall.c b/gdb/infcall.c
index 0d8d5b2..b83f1bf 100644
--- a/gdb/infcall.c
+++ b/gdb/infcall.c
@@ -145,13 +145,11 @@ 
    for arguments to be passed to C, Ada or Fortran functions.
 
    If PARAM_TYPE is non-NULL, it is the expected parameter type.
-   IS_PROTOTYPED is non-zero if the function declaration is prototyped.
-   SP is the stack pointer were additional data can be pushed (updating
-   its value as needed).  */
+   IS_PROTOTYPED is non-zero if the function declaration is prototyped.  */
 
 static struct value *
 value_arg_coerce (struct gdbarch *gdbarch, struct value *arg,
-		  struct type *param_type, int is_prototyped, CORE_ADDR *sp)
+		  struct type *param_type, int is_prototyped)
 {
   const struct builtin_type *builtin = builtin_type (gdbarch);
   struct type *arg_type = check_typedef (value_type (arg));
@@ -984,7 +982,7 @@ 
 	param_type = NULL;
 
       args[i] = value_arg_coerce (gdbarch, args[i],
-				  param_type, prototyped, &sp);
+				  param_type, prototyped);
 
       if (param_type != NULL && language_pass_by_reference (param_type))
 	args[i] = value_addr (args[i]);