From: Bruno Haible Date: Sun, 10 Feb 2008 18:22:48 +0000 (+0100) Subject: Avoid gcc warnings due to misplaced 'const'. X-Git-Tag: v0.1~7768 X-Git-Url: http://erislabs.net/gitweb/?a=commitdiff_plain;h=506bbd4259b25b0fa7532ccf144d9441324dbfca;p=gnulib.git Avoid gcc warnings due to misplaced 'const'. --- diff --git a/ChangeLog b/ChangeLog index cd8df71b9..fca5c9f53 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2008-02-10 Bruno Haible + + * lib/diffseq.h: Write "ELEMENT const" instead of "const ELEMENT". + Needed when ELEMENT is #defined to 'some_type *'. + 2008-02-10 Jim Meyering New script and module: useless-if-before-free diff --git a/lib/diffseq.h b/lib/diffseq.h index ad8b8b3a2..7a62196f4 100644 --- a/lib/diffseq.h +++ b/lib/diffseq.h @@ -76,8 +76,8 @@ struct context { /* Vectors being compared. */ - const ELEMENT *xvec; - const ELEMENT *yvec; + ELEMENT const *xvec; + ELEMENT const *yvec; /* Extra fields. */ EXTRA_CONTEXT_FIELDS @@ -153,8 +153,8 @@ diag (OFFSET xoff, OFFSET xlim, OFFSET yoff, OFFSET ylim, bool find_minimal, { OFFSET *const fd = ctxt->fdiag; /* Give the compiler a chance. */ OFFSET *const bd = ctxt->bdiag; /* Additional help for the compiler. */ - const ELEMENT *const xv = ctxt->xvec; /* Still more help for the compiler. */ - const ELEMENT *const yv = ctxt->yvec; /* And more and more . . . */ + ELEMENT const *const xv = ctxt->xvec; /* Still more help for the compiler. */ + ELEMENT const *const yv = ctxt->yvec; /* And more and more . . . */ const OFFSET dmin = xoff - ylim; /* Minimum valid diagonal. */ const OFFSET dmax = xlim - yoff; /* Maximum valid diagonal. */ const OFFSET fmid = xoff - yoff; /* Center diagonal of top-down search. */