Messages in this thread Patch in this message | | | From | Paul Rusty Russell <> | Subject | [PATCH] egcs "unused variable" warning fixup. | Date | Tue, 22 Jun 1999 00:01:35 +0930 |
| |
Doesn't seem to alter codegen, and gets rid of complaints about "unused" spinlocks for non-SMP. Surrounding spinlock decls by #ifdef CONFIG_SMP is gross, and breaks spinlock debugging.
Rusty. --- linux/include/asm/spinlock.h.~3~ Tue Jun 8 17:40:27 1999 +++ linux/include/asm/spinlock.h Mon Jun 21 23:57:12 1999 @@ -50,7 +50,7 @@ #endif #define spin_lock_init(lock) do { } while(0) -#define spin_lock(lock) do { } while(0) +#define spin_lock(lock) (void)(lock) /* Not "unused variable". */ #define spin_trylock(lock) (1) #define spin_unlock_wait(lock) do { } while(0) #define spin_unlock(lock) do { } while(0) @@ -109,9 +109,9 @@ #define RW_LOCK_UNLOCKED (rwlock_t) { 0 } #endif -#define read_lock(lock) do { } while(0) +#define read_lock(lock) (void)(lock) /* Not "unused variable". */ #define read_unlock(lock) do { } while(0) -#define write_lock(lock) do { } while(0) +#define write_lock(lock) (void)(lock) /* Not "unused variable". */ #define write_unlock(lock) do { } while(0) #else /* __SMP__ */ -- Tridge, Raster, DaveM, Cort, maddog... Where will you be 9-11 July 1999? http://www.linux.org.au/projects/calu - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |