Skip to contentSkip to conversation

arch: cris: mm: add a code block for variable declaration

PATCH New Chen Gang 1 participant 1 message Jun 27, 2013 Generic include/asm header files

lore
Share & tools
lore

Chen Gang

author
#0 lore raw

PATCH 1/1 arch: cris: mm: add a code block for variable declaration

Need a code block for variable declaration, or can not pass compiling by old C compiler.

The new C compiler will report the warning (with allmodconfig):

arch/cris/mm/fault.c: In function ‘do_page_fault’:
arch/cris/mm/fault.c:228:3: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement]

---
 arch/cris/mm/fault.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)
arch/cris/mm/fault.c +4 -2
index 73312ab..919ab17c 100644
@@ -225,8 +225,10 @@ retry:
 			show_registers(regs);
 
 #ifdef CONFIG_NO_SEGFAULT_TERMINATION
-		DECLARE_WAIT_QUEUE_HEAD(wq);
-		wait_event_interruptible(wq, 0 == 1);
+		{
+			DECLARE_WAIT_QUEUE_HEAD(wq);
+			wait_event_interruptible(wq, 0 == 1);
+		}
 #else
 		info.si_signo = SIGSEGV;
 		info.si_errno = 0;
Signature · 1 line
1.7.7.6