Re: Re 2da39de "fbsd-nat: Pacify gcc with no functional changes"
Enze Li via Gdb <[email protected]>
| Newsgroups | gmane.comp.gdb.devel |
|---|---|
| Message-ID | <OS3P286MB2152E0774FC8FFADA18A796FF0C3A@OS3P286MB2152.JPNP286.PROD.OUTLOOK.COM> |
Hi Arsen, Thanks for your feedback, I'll fix this soon. Thanks, Enze On Tue, Sep 26 2023 at 01:39:48 AM +0200, Arsen Arsenović wrote: > Hi, > > This patch seems to have broken building GDB on > x86_64-portbld-freebsd13.1 for me. In the following hunk... > > @@ -2094,6 +2092,9 @@ fbsd_nat_target::detach (inferior *inf, int from_tty) > } > } > } > +#else > + /* pacify gcc */ > + wptid = (void) null_ptid; > #endif > sig = 0; > break; > > ... in the #else branch, there's a cast which I can't discern the > purpose of. The type of wptid is the same as the type of null_ptid, and > a cast to void as an rvalue doesn't make sense. Dropping the cast > results in the build working again (and no warnings). > > Did you mean for this line to be 'wptid = null_ptid'? > > TIA, have a lovely night :-)