From: Matthieu Moy Date: Mon, 14 Oct 2013 12:33:57 GMT Subject: Re: [PATCH] mv: Fix spurious warning when moving a file in presence of submodules Message-ID: In-Reply-To: <20131014054048.GC25344@google.com> Jonathan Nieder writes: > Matthieu Moy wrote: >> Jens Lehmann writes: > >>> static struct lock_file lock_file; >>> +#define SUBMODULE_WITH_GITDIR ((const char *)1) >> >> I don't like very much hardcoded addresses like this. Are you 100% sure >> address 1 will never be returned by xstrdup on any platform? The risk is >> small if not negligible, but I'm unconfortable with this. > > I haven't checked what the standards say, but in practice I think it's > okay. [...] We use (void *) 1 in the same way a few places currently. OK, fine with me. -- Matthieu Moy http://www-verimag.imag.fr/~moy/