Skip to contentSkip to conversation

Compiler warnings / linux-2.6

DISCUSSION Ralf Rösch 2 participants 2 messages Jun 6, 2005 – Jun 7, 2005 MIPS

lore
Share & tools
lore
#0 lore raw

Since a few days I get a lot of compiler warnings:

include2/asm/dsp.h: In function `__init_dsp':
include2/asm/dsp.h:34: warning: statement with no effect

What could I do to prevent these?

Thanks
Ralf

#1 lore raw
Quoted 6 lines · Ralf Rösch

Since a few days I get a lot of compiler warnings:

include2/asm/dsp.h: In function `__init_dsp':
include2/asm/dsp.h:34: warning: statement with no effect

What could I do to prevent these?

Reporting them. A fairly obvious and harmless problem. I'm surprised my compiler (gcc 3.4) doesn't throw these warnings.

Ralf

Index: include/asm-mips/mipsregs.h
===================================================================
RCS file: /home/cvs/linux/include/asm-mips/mipsregs.h,v retrieving revision 1.73

asm-mips/mipsregs.h +0 -3
diff -u -r1.73 mipsregs.h
@@ -1010,8 +1010,6 @@
 
 #define wrdsp(val, mask)						\
 do {									\
-	unsigned int __res;						\
-									\
 	__asm__ __volatile__(						\
 	"	.set	push					\n"	\
 	"	.set	noat					\n"	\
@@ -1021,7 +1019,6 @@
 	"	.set	pop					\n"	\
         :								\
 	: "r" (val), "i" (mask));					\
-        __res;								\
 } while (0)
 
 #if 0	/* Need DSP ASE capable assembler ... */