2.2.18pre2: gcc 2.7 doesn't like __attr__((unused))

From: Chip Salzenberg (chip@valinux.com)
Date: Sat Sep 02 2000 - 01:12:35 EDT

  • Next message: Chip Salzenberg: "[PATCH] 2.2.18pre2: AGP and the i810"

    I'm not sure if __attribute__((unused)) has an equivalent in gcc 2.7,
    but as it appears in the AGP driver, it doesn't work with gcc 2.7.
    Below is the patch I used to get AGP to compile, but I don't recommend
    it for adoption in the standard source tree.

    Index: drivers/char/drm/ffb_drv.c
    --- drivers/char/drm/ffb_drv.c.prev
    +++ drivers/char/drm/ffb_drv.c Fri Sep 1 21:21:08 2000
    @@ -16,5 +16,5 @@
     #include <linux/agp_backend.h>
     
    -static __attribute__((unused)) void unused(void)
    +static void unused(void)
     {
             agp_enable(0);

    Index: drivers/char/drm/gamma_drv.c
    --- drivers/char/drm/gamma_drv.c.prev
    +++ drivers/char/drm/gamma_drv.c Fri Sep 1 21:21:03 2000
    @@ -36,5 +36,5 @@
     #include <linux/agp_backend.h>
     
    -static __attribute__((unused)) void unused(void)
    +static void unused(void)
     {
             agp_enable(0);

    Index: drivers/char/drm/i810_drv.c
    --- drivers/char/drm/i810_drv.c.prev
    +++ drivers/char/drm/i810_drv.c Fri Sep 1 21:20:58 2000
    @@ -36,5 +36,5 @@
     #include <linux/agp_backend.h>
     
    -static __attribute__((unused)) void unused(void)
    +static void unused(void)
     {
             agp_enable(0);

    Index: drivers/char/drm/mga_drv.c
    --- drivers/char/drm/mga_drv.c.prev
    +++ drivers/char/drm/mga_drv.c Fri Sep 1 21:20:52 2000
    @@ -37,5 +37,5 @@
     #include <linux/agp_backend.h>
     
    -static __attribute__((unused)) void unused(void)
    +static void unused(void)
     {
             agp_enable(0);

    Index: drivers/char/drm/r128_drv.c
    --- drivers/char/drm/r128_drv.c.prev
    +++ drivers/char/drm/r128_drv.c Fri Sep 1 21:20:40 2000
    @@ -36,5 +36,5 @@
     #include <linux/agp_backend.h>
     
    -static __attribute__((unused)) void unused(void)
    +static void unused(void)
     {
             agp_enable(0);

    Index: drivers/char/drm/tdfx_drv.c
    --- drivers/char/drm/tdfx_drv.c.prev
    +++ drivers/char/drm/tdfx_drv.c Fri Sep 1 21:20:47 2000
    @@ -37,5 +37,5 @@
     #include <linux/agp_backend.h>
     
    -static __attribute__((unused)) void unused(void)
    +static void unused(void)
     {
             agp_enable(0);

    -- 
    Chip Salzenberg              - a.k.a. -              <chip@valinux.com>
    "I wanted to play hopscotch with the impenetrable mystery of existence,
        but he stepped in a wormhole and had to go in early."  // MST3K
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    Please read the FAQ at http://www.tux.org/lkml/
    



    This archive was generated by hypermail 2b29 : Sat Sep 02 2000 - 01:17:24 EDT