* [PATCH trivial] Fix "value computed not used" warnings
@ 2006-02-14 19:49 Takashi Iwai
2006-02-17 16:09 ` Jan Engelhardt
0 siblings, 1 reply; 2+ messages in thread
From: Takashi Iwai @ 2006-02-14 19:49 UTC (permalink / raw)
To: Andrew Morton; +Cc: linux-kernel
Fixes for annoying gcc-4.1 compile warnings "value computed not used".
Simply cast to void.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
drivers/block/paride/comm.c | 16 ++++++++--------
drivers/block/paride/on26.c | 2 +-
drivers/net/8139too.c | 2 +-
kernel/kexec.c | 4 ++--
4 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/drivers/block/paride/comm.c b/drivers/block/paride/comm.c
index d842956..065820b 100644
--- a/drivers/block/paride/comm.c
+++ b/drivers/block/paride/comm.c
@@ -60,7 +60,7 @@ static int comm_read_regr( PIA *pi, int
case 2:
case 3:
- case 4: w3(r+0x20); r1();
+ case 4: w3(r+0x20); (void) r1();
w2(0x24); h = r4(); w2(4);
return h;
@@ -82,7 +82,7 @@ static void comm_write_regr( PIA *pi, in
case 2:
case 3:
- case 4: w3(r); r1(); w4(val);
+ case 4: w3(r); (void) r1(); w4(val);
break;
}
}
@@ -126,17 +126,17 @@ static void comm_read_block( PIA *pi, ch
w2(4);
break;
- case 2: w3(0x68); r1(); w2(0x24);
+ case 2: w3(0x68); (void) r1(); w2(0x24);
for (i=0;i<count;i++) buf[i] = r4();
w2(4);
break;
- case 3: w3(0x68); r1(); w2(0x24);
+ case 3: w3(0x68); (void) r1(); w2(0x24);
for (i=0;i<count/2;i++) ((u16 *)buf)[i] = r4w();
w2(4);
break;
- case 4: w3(0x68); r1(); w2(0x24);
+ case 4: w3(0x68); (void) r1(); w2(0x24);
for (i=0;i<count/4;i++) ((u32 *)buf)[i] = r4l();
w2(4);
break;
@@ -160,15 +160,15 @@ static void comm_write_block( PIA *pi, c
w2(5); w2(4);
break;
- case 2: w3(0x48); r1();
+ case 2: w3(0x48); (void) r1();
for (k=0;k<count;k++) w4(buf[k^1]);
break;
- case 3: w3(0x48); r1();
+ case 3: w3(0x48); (void) r1();
for (k=0;k<count/2;k++) w4w(pi_swab16(buf,k));
break;
- case 4: w3(0x48); r1();
+ case 4: w3(0x48); (void) r1();
for (k=0;k<count/4;k++) w4l(pi_swab32(buf,k));
break;
diff --git a/drivers/block/paride/on26.c b/drivers/block/paride/on26.c
index 9f837d9..8090014 100644
--- a/drivers/block/paride/on26.c
+++ b/drivers/block/paride/on26.c
@@ -66,7 +66,7 @@ static int on26_read_regr( PIA *pi, int
case 3:
case 4: w3(1); w3(1); w2(5); w4(r); w2(4);
w3(0); w3(0); w2(0x24); a = r4(); w2(4);
- w2(0x24); r4(); w2(4);
+ w2(0x24); (void) r4(); w2(4);
return a;
}
diff --git a/drivers/net/8139too.c b/drivers/net/8139too.c
index 2beac55..3611b66 100644
--- a/drivers/net/8139too.c
+++ b/drivers/net/8139too.c
@@ -1131,7 +1131,7 @@ static void __devexit rtl8139_remove_one
No extra delay is needed with 33Mhz PCI, but 66Mhz may change this.
*/
-#define eeprom_delay() RTL_R32(Cfg9346)
+#define eeprom_delay() (void) RTL_R32(Cfg9346)
/* The EEPROM commands include the alway-set leading bit. */
#define EE_WRITE_CMD (5)
diff --git a/kernel/kexec.c b/kernel/kexec.c
index bf39d28..9351be7 100644
--- a/kernel/kexec.c
+++ b/kernel/kexec.c
@@ -995,7 +995,7 @@ asmlinkage long sys_kexec_load(unsigned
image = xchg(dest_image, image);
out:
- xchg(&kexec_lock, 0); /* Release the mutex */
+ (void) xchg(&kexec_lock, 0); /* Release the mutex */
kimage_free(image);
return result;
@@ -1063,7 +1063,7 @@ void crash_kexec(struct pt_regs *regs)
machine_crash_shutdown(&fixed_regs);
machine_kexec(image);
}
- xchg(&kexec_lock, 0);
+ (void) xchg(&kexec_lock, 0);
}
}
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH trivial] Fix "value computed not used" warnings
2006-02-14 19:49 [PATCH trivial] Fix "value computed not used" warnings Takashi Iwai
@ 2006-02-17 16:09 ` Jan Engelhardt
0 siblings, 0 replies; 2+ messages in thread
From: Jan Engelhardt @ 2006-02-17 16:09 UTC (permalink / raw)
To: Takashi Iwai; +Cc: Andrew Morton, linux-kernel
>Fixes for annoying gcc-4.1 compile warnings "value computed not used".
>Simply cast to void.
>
Iiih, casts.
The thing is defined as
#define r1() (in_p(1) & 0xff)
so what do we call it for - does inb do more than just reading, like
resetting the ioport to 0?
Jan Engelhardt
--
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2006-02-17 16:09 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-02-14 19:49 [PATCH trivial] Fix "value computed not used" warnings Takashi Iwai
2006-02-17 16:09 ` Jan Engelhardt
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®