[patch] cleanup: Wunused infrun, jit
Aleksandar Ristovski
aristovski@qnx.com
Thu Jan 31 19:14:00 GMT 2013
On 13-01-31 12:47 PM, Tom Tromey wrote:
>>>>>> "Aleksandar" == Aleksandar Ristovski <aristovski@qnx.com> writes:
>
> Aleksandar> * infrun.c (handle_syscall_event): Remove unused GDBARCH.
> Aleksandar> (save_infcall_suspend_state): Remove unused INF.
> Aleksandar> (restore_infcall_suspend_state): Remove unused INF.
> Aleksandar> * jit.c (jit_register_code): Remove unused I, B, INF_DATA.
> Aleksandar> (jit_frame_sniffer): Remove unused INF_DATA.
>
> Mostly ok with the renaming.
>
> Aleksandar> @@ -6745,7 +6743,6 @@ save_infcall_suspend_state (void)
> Aleksandar> {
> Aleksandar> struct infcall_suspend_state *inf_state;
> Aleksandar> struct thread_info *tp = inferior_thread ();
> Aleksandar> - struct inferior *inf = current_inferior ();
>
> This one and the one in restore_infcall_suspend_state are weird.
> They refer to commented-out code.
>
> Later in the function:
>
> #if 0 /* Currently unused and empty structures are not valid C. */
> inf_state->inferior_suspend = inf->suspend;
> #endif
>
> The type "definition":
>
> #if 0 /* Currently unused and empty structures are not valid C. */
> struct inferior_suspend_state
> {
> };
> #endif
>
>
> If you want to #if 0 the definitions, I'll approve that.
> Otherwise I think Pedro or Jan should weigh in.
>
> The rest is ok.
New patch, with #if 0 instead of deletion attached for reference.
ChangeLog slightly changed (and name casing fixed):
* infrun.c (handle_syscall_event): Remove unused gdbarch.
(save_infcall_suspend_state): Ifdef out unused inf.
(restore_infcall_suspend_state): Ifdef out unused inf.
* jit.c (jit_register_code): Remove unused i, b, inf_data.
(jit_frame_sniffer): Remove unused inf_data.
I'll consider your 'ok' still applies and go ahead with the commit shortly.
Thank you,
Aleksandar Ristovski
QNX Software Systems
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Wunused-inf-201301311409.patch
Type: text/x-patch
Size: 2520 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/gdb-patches/attachments/20130131/e1473f7e/attachment.bin>
More information about the Gdb-patches
mailing list