On 12/09/2014 08:50 PM, Daiki Ueno wrote: > Hello, > > I got a minor warning when compiling gettext, which uses the 'diffseq' > module without USE_HEURISTIC set. > > diffseq.h: In function 'diag': > diffseq.h:189:12: warning: variable 'big_snake' set but not used > [-Wunused-but-set-variable]
> +++ b/lib/diffseq.h
> @@ -186,7 +186,9 @@ diag (OFFSET xoff, OFFSET xlim, OFFSET yoff, OFFSET ylim,
> for (c = 1;; ++c)
> {
> OFFSET d; /* Active diagonal. */
> +#ifdef USE_HEURISTIC
> bool big_snake = false;
Rather than using #ifdef everywhere, can you test if:
bool big_snake _GL_UNUSED = false;
does the trick of shutting up the compiler? If so, a one-line fix is a
lot more palatable.
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
