Skip to contentSkip to conversation

lock validator: fix compiler warning

PATCH New Ingo Molnar 1 participant 1 message Jun 2, 2006

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 lock validator: fix compiler warning

Subject: lock validator: fix compiler warning
From: Ingo Molnar <[email protected]>

fix harmless lockdep.c warning on !SMP:

kernel/lockdep.c: In function 'static_obj':
kernel/lockdep.c:1112: warning: unused variable 'i'

---
 kernel/lockdep.c |    2 ++
 1 file changed, 2 insertions(+)
kernel/lockdep.c +2 -0
Index: linux/kernel/lockdep.c
===================================================================
@@ -1109,7 +1109,9 @@ static int static_obj(void *obj)
 	unsigned long start = (unsigned long) &_stext,
 		      end   = (unsigned long) &_end,
 		      addr  = (unsigned long) obj;
+#ifdef CONFIG_SMP
 	int i;
+#endif
 
 	/*
 	 * static variable?