Message ID | c3c47cff-b385-9fa0-3c15-0aac5291626c@bell.net |
---|---|
State | New |
Headers | show |
Series | [committed] hppa: Fix warning in pa32_fallback_frame_state | expand |
On Mai 26 2019, John David Anglin <dave.anglin@bell.net> wrote: > Index: config/pa/linux-unwind.h > =================================================================== > --- config/pa/linux-unwind.h (revision 271614) > +++ config/pa/linux-unwind.h (working copy) > @@ -130,7 +130,7 @@ > return _URC_END_OF_STACK; > > frame = (struct rt_sigframe *)(sp + off); > - sc = &frame->uc.uc_mcontext; > + sc = (struct sigcontext *)&frame->uc.uc_mcontext; Why is it not better to use the correct type? Andreas.
On 2019-05-26 12:13 p.m., Andreas Schwab wrote: > On Mai 26 2019, John David Anglin <dave.anglin@bell.net> wrote: > >> Index: config/pa/linux-unwind.h >> =================================================================== >> --- config/pa/linux-unwind.h (revision 271614) >> +++ config/pa/linux-unwind.h (working copy) >> @@ -130,7 +130,7 @@ >> return _URC_END_OF_STACK; >> >> frame = (struct rt_sigframe *)(sp + off); >> - sc = &frame->uc.uc_mcontext; >> + sc = (struct sigcontext *)&frame->uc.uc_mcontext; > Why is it not better to use the correct type? I can't remember the full details why "struct sigcontext *" was used for the type of sc but I think it was done to avoid the renaming of the fields in the mcontext_t type. Dave
Index: config/pa/linux-unwind.h =================================================================== --- config/pa/linux-unwind.h (revision 271614) +++ config/pa/linux-unwind.h (working copy) @@ -130,7 +130,7 @@ return _URC_END_OF_STACK; frame = (struct rt_sigframe *)(sp + off); - sc = &frame->uc.uc_mcontext; + sc = (struct sigcontext *)&frame->uc.uc_mcontext; new_cfa = sc->sc_gr[30]; fs->regs.cfa_how = CFA_REG_OFFSET;