bug-gnulib
[Top][All Lists]
Advanced

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

diffseq.h tweak


From: Bruno Haible
Subject: diffseq.h tweak
Date: Sun, 10 Feb 2008 19:22:27 +0100
User-agent: KMail/1.5.4

The 'const's in diffseq.h cause gcc warnings when the ELEMENT is defined to a
pointer type (not a typedef), as in
  #define ELEMENT struct foo *
This fixes it.

2008-02-10  Bruno Haible  <address@hidden>

        * lib/diffseq.h: Write "ELEMENT const" instead of "const ELEMENT".
        Needed when ELEMENT is #defined to 'some_type *'.

*** lib/diffseq.h.orig  2008-02-10 19:18:29.000000000 +0100
--- lib/diffseq.h       2008-02-10 18:16:25.000000000 +0100
***************
*** 76,83 ****
  struct context
  {
    /* Vectors being compared.  */
!   const ELEMENT *xvec;
!   const ELEMENT *yvec;
  
    /* Extra fields.  */
    EXTRA_CONTEXT_FIELDS
--- 76,83 ----
  struct context
  {
    /* Vectors being compared.  */
!   ELEMENT const *xvec;
!   ELEMENT const *yvec;
  
    /* Extra fields.  */
    EXTRA_CONTEXT_FIELDS
***************
*** 153,160 ****
  {
    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 . . . */
    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. 
*/
--- 153,160 ----
  {
    OFFSET *const fd = ctxt->fdiag;     /* Give the compiler a chance. */
    OFFSET *const bd = ctxt->bdiag;     /* Additional help for the compiler. */
!   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. 
*/





reply via email to

[Prev in Thread] Current Thread [Next in Thread]