mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-09-21 21:25:24 +08:00
Remove an unnecessary block in call_function_by_hand_dummy
I noticed that call_function_by_hand_dummy has a block that only exists to declare a variable, like: { int i; for (i = ...0) ... } This patch removes the unnecessary and the extra indentation by moving the declaration into the "for". gdb/ChangeLog 2018-09-14 Tom Tromey <tom@tromey.com> * infcall.c (call_function_by_hand_dummy): Remove unnecessary block.
This commit is contained in:
@ -1,3 +1,8 @@
|
|||||||
|
2018-09-14 Tom Tromey <tom@tromey.com>
|
||||||
|
|
||||||
|
* infcall.c (call_function_by_hand_dummy): Remove unnecessary
|
||||||
|
block.
|
||||||
|
|
||||||
2018-09-14 Tom Tromey <tom@tromey.com>
|
2018-09-14 Tom Tromey <tom@tromey.com>
|
||||||
|
|
||||||
* nat/fork-inferior.c (get_startup_shell): Remove "static".
|
* nat/fork-inferior.c (get_startup_shell): Remove "static".
|
||||||
|
@ -970,10 +970,7 @@ call_function_by_hand_dummy (struct value *function,
|
|||||||
if (nargs < TYPE_NFIELDS (ftype))
|
if (nargs < TYPE_NFIELDS (ftype))
|
||||||
error (_("Too few arguments in function call."));
|
error (_("Too few arguments in function call."));
|
||||||
|
|
||||||
{
|
for (int i = nargs - 1; i >= 0; i--)
|
||||||
int i;
|
|
||||||
|
|
||||||
for (i = nargs - 1; i >= 0; i--)
|
|
||||||
{
|
{
|
||||||
int prototyped;
|
int prototyped;
|
||||||
struct type *param_type;
|
struct type *param_type;
|
||||||
@ -1013,7 +1010,6 @@ call_function_by_hand_dummy (struct value *function,
|
|||||||
if (param_type != NULL && language_pass_by_reference (param_type))
|
if (param_type != NULL && language_pass_by_reference (param_type))
|
||||||
args[i] = value_addr (args[i]);
|
args[i] = value_addr (args[i]);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
/* Reserve space for the return structure to be written on the
|
/* Reserve space for the return structure to be written on the
|
||||||
stack, if necessary. Make certain that the value is correctly
|
stack, if necessary. Make certain that the value is correctly
|
||||||
|
Reference in New Issue
Block a user