Re: [PATCH] config.mak.dev: enable -Wunreachable-code

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Jun 04, 2025 at 07:37:50AM +0900, Mike Hommey wrote:
> On Tue, Jun 03, 2025 at 03:07:36PM -0700, Junio C Hamano wrote:
> > Mike Hommey <mh@xxxxxxxxxxxx> writes:
> > 
> > > There is a similar problem with this code in refs/files-backend.c:
> > >
> > > 			if (!create_ref_symlink(lock, update->new_target))
> > > 				continue;
> > >
> > > Where create_ref_symlink is defined as such:
> > >
> > > #ifdef NO_SYMLINK_HEAD
> > > #define create_ref_symlink(a, b) (-1)
> > > #else
> > > static int create_ref_symlink(struct ref_lock *lock, const char *target)
> > > {
> > > ...
> > > #endif
> > >
> > > And NO_SYMLINK_HEAD is defined on Windows.
> > 
> > Would the NOT_CONSTANT() trick we ended up using for the original
> > "sigfillset" thing solve your issue as well?
> 
>    if (NOT_CONSTANT(!create_ref_symlink(lock, update->new_target)))
> 
> indeed works around it.

I sent it as a patch along with other warning fixes.

Mike




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux