lkml.org 
[lkml]   [1999]   [Jun]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] egcs "unused variable" warning fixup.
Date

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/

\
 
 \ /
  Last update: 2005-03-22 13:52    [W:0.024 / U:0.008 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site