[2.4 patch][4/6] irlmp.c: fix gcc 3.4 compilation

From: Adrian Bunk (bunk_at_fs.tum.de)
Date: 08/26/04

  • Next message: John Stoffel: "Re: silent semantic changes with reiser4"
    Date:	Thu, 26 Aug 2004 22:02:02 +0200
    To: Marcelo Tosatti <marcelo.tosatti@cyclades.com>
    
    

    I got the following compile error when trying to build 2.4.28-pre2 using
    gcc 3.4:

    <-- snip -->

    ...
    gcc-3.4 -D__KERNEL__
    -I/home/bunk/linux/kernel-2.4/linux-2.4.28-pre2-full/include -Wall
    -Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common
    -fomit-frame-pointer -pipe -mpreferred-stack-boundary=2 -march=athlon
    -fno-unit-at-a-time -nostdinc -iwithprefix include
    -DKBUILD_BASENAME=irlmp -c -o irlmp.o irlmp.c
    irlmp.c: In function `irlmp_flow_indication':
    irlmp.c:1244: error: parse error before "__FUNCTION__"
    irlmp.c:1258: error: parse error before "__FUNCTION__"
    irlmp.c:1277: error: parse error before "__FUNCTION__"
    irlmp.c:1284: error: parse error before "__FUNCTION__"
    make[3]: *** [irlmp.o] Error 1
    make[3]: Leaving directory `/home/bunk/linux/kernel-2.4/linux-2.4.28-pre2-full/net/irda'

    <-- snip -->

    The patch below fixes this issue (similar to how it was done in 2.6).

    Signed-off-by: Adrian Bunk <bunk@fs.tum.de>

    --- linux-2.4.28-pre2-full/net/irda/irlmp.c.old 2004-08-26 19:36:09.000000000 +0200
    +++ linux-2.4.28-pre2-full/net/irda/irlmp.c 2004-08-26 19:38:48.000000000 +0200
    @@ -1241,7 +1241,7 @@
             /* Get the number of lsap. That's the only safe way to know
              * that we have looped around... - Jean II */
             lsap_todo = HASHBIN_GET_SIZE(self->lsaps);
    - IRDA_DEBUG(4, __FUNCTION__ "() : %d lsaps to scan\n", lsap_todo);
    + IRDA_DEBUG(4, "%s() : %d lsaps to scan\n", __FUNCTION__ , lsap_todo);
     
             /* Poll lsap in order until the queue is full or until we
              * tried them all.
    @@ -1255,7 +1255,7 @@
                             /* Note that if there is only one LSAP on the LAP
                              * (most common case), self->flow_next is always NULL,
                              * so we always avoid this loop. - Jean II */
    - IRDA_DEBUG(4, __FUNCTION__ "() : searching my LSAP\n");
    + IRDA_DEBUG(4, "%s() : searching my LSAP\n", __FUNCTION__ );
     
                             /* We look again in hashbins, because the lsap
                              * might have gone away... - Jean II */
    @@ -1274,14 +1274,14 @@
     
                     /* Next time, we will get the next one (or the first one) */
                     self->flow_next = (struct lsap_cb *) hashbin_get_next(self->lsaps);
    - IRDA_DEBUG(4, __FUNCTION__ "() : curr is %p, next was %p and is now %p, still %d to go - queue len = %d\n", curr, next, self->flow_next, lsap_todo, IRLAP_GET_TX_QUEUE_LEN(self->irlap));
    + IRDA_DEBUG(4, "%s() : curr is %p, next was %p and is now %p, still %d to go - queue len = %d\n", __FUNCTION__ , curr, next, self->flow_next, lsap_todo, IRLAP_GET_TX_QUEUE_LEN(self->irlap));
     
                     /* Inform lsap user that it can send one more packet. */
                     if (curr->notify.flow_indication != NULL)
                             curr->notify.flow_indication(curr->notify.instance,
                                                          curr, flow);
                     else
    - IRDA_DEBUG(1, __FUNCTION__ "(), no handler\n");
    + IRDA_DEBUG(1, "%s(), no handler\n", __FUNCTION__ );
             }
     }
     
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/


  • Next message: John Stoffel: "Re: silent semantic changes with reiser4"

    Relevant Pages

    • Re: [PATCH 12/39] NLKD/i386 - time adjustment
      ... The patch includes code that seems to imply that gcc can not do mpy of variables. ... I really do not see the relavence of the run time library patches given the above. ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: [CFT] updated gcc-3.4.0 fixes patch for 2.4.27-pre1
      ... I propose fixing problems that will appear with gcc 3.5, ... Here is a patch for the few places I got hit at. ... pci_set_drvdata(pci_dev, dev); ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • [PATCH 1/2] new valid_signal function (fwd)
      ... A while back I attempted to fix a little, not at all critical, gcc -W ... Below is the first patch that adds the new function. ... pointless and generates warnings when building with gcc -W. ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: [patch] Re: Kernels > 2.6.1-mm3 do not boot. - REALLY SOLVED
      ... My version of gcc, I just sent you adding the ... >> secondary kernel, recompiled without it and all was fine again. ... This patch should fix it. ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • [patch] 2.6.4-mm2: ALSA au88x0.c doesnt compile with gcc 2.95
      ... The following compile error with gcc 2.95 comes from Linus' tree: ... There had been need of rain for many days. ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)