All of lore.kernel.org
 help / color / mirror / Atom feed
* Clean dirty code avoiding warning messages when compiling
@ 2006-01-18  8:58 Xue, Haifeng
  2006-01-18 13:08 ` Vincent Hanquez
  0 siblings, 1 reply; 2+ messages in thread
From: Xue, Haifeng @ 2006-01-18  8:58 UTC (permalink / raw)
  To: xen-devel

[-- Attachment #1: Type: text/plain, Size: 113 bytes --]

Clean dirty code avoiding warning messages when compiling

Signed-off-by: Haifeng Xue <haifeng.xue@intel.com>

[-- Attachment #2: clean.patch --]
[-- Type: application/octet-stream, Size: 2559 bytes --]

diff -r 8d6edcf06f9b tools/firmware/vmxassist/acpi_madt.c
--- a/tools/firmware/vmxassist/acpi_madt.c	Tue Jan 17 15:09:03 2006
+++ b/tools/firmware/vmxassist/acpi_madt.c	Wed Jan 18 15:55:33 2006
@@ -55,7 +55,6 @@
 get_hvm_info_table(void)
 {
 	struct hvm_info_table *t;
-	int i;
 
 	if (table != NULL)
 		return table;
diff -r 8d6edcf06f9b tools/ioemu/audio/noaudio.c
--- a/tools/ioemu/audio/noaudio.c	Tue Jan 17 15:09:03 2006
+++ b/tools/ioemu/audio/noaudio.c	Wed Jan 18 15:55:33 2006
@@ -41,7 +41,6 @@
 {
     NoVoice *no = (NoVoice *) hw;
     int rpos, live, decr, samples;
-    uint8_t *dst;
     st_sample_t *src;
     int64_t now = qemu_get_clock (vm_clock);
     int64_t ticks = now - no->old_ticks;
@@ -82,7 +81,6 @@
 
 static int no_hw_init (HWVoice *hw, int freq, int nchannels, audfmt_e fmt)
 {
-    NoVoice *no = (NoVoice *) hw;
     hw->freq = freq;
     hw->nchannels = nchannels;
     hw->fmt = fmt;
diff -r 8d6edcf06f9b tools/ioemu/cpu.h
--- a/tools/ioemu/cpu.h	Tue Jan 17 15:09:03 2006
+++ b/tools/ioemu/cpu.h	Wed Jan 18 15:55:33 2006
@@ -63,6 +63,9 @@
 /* MSDOS compatibility mode FPU exception support */
 void cpu_set_ferr(CPUX86State *s);
 
+/* helper2.c */
+void cpu_x86_set_a20(CPUX86State *env, int a20_state);
+
 #if defined(__i386__) || defined(__x86_64__)
 #define TARGET_PAGE_BITS 12
 #elif defined(__ia64__)
diff -r 8d6edcf06f9b tools/ioemu/hw/pc.c
--- a/tools/ioemu/hw/pc.c	Tue Jan 17 15:09:03 2006
+++ b/tools/ioemu/hw/pc.c	Wed Jan 18 15:55:33 2006
@@ -382,8 +382,6 @@
 {
     char buf[1024];
     int ret, linux_boot, initrd_size, i, nb_nics1;
-    unsigned long bios_offset, vga_bios_offset;
-    int bios_size, isa_bios_size;
     PCIBus *pci_bus;
     extern void * shared_vram;
     
diff -r 8d6edcf06f9b tools/ioemu/vl.c
--- a/tools/ioemu/vl.c	Tue Jan 17 15:09:03 2006
+++ b/tools/ioemu/vl.c	Wed Jan 18 15:55:33 2006
@@ -1204,7 +1204,7 @@
         return -1;
     }
     strcat(path, "/console/tty");
-    if (!xs_write(xs, NULL, path, pts, strlen(pts))) {
+    if (!xs_write(xs, (xs_transaction_t)NULL, path, pts, strlen(pts))) {
         fprintf(logfile, "xs_write for console fail");
         return -1;
     }
diff -r 8d6edcf06f9b tools/ioemu/vl.h
--- a/tools/ioemu/vl.h	Tue Jan 17 15:09:03 2006
+++ b/tools/ioemu/vl.h	Wed Jan 18 15:55:33 2006
@@ -354,6 +354,9 @@
 void qemu_get_timer(QEMUFile *f, QEMUTimer *ts);
 void qemu_put_timer(QEMUFile *f, QEMUTimer *ts);
 
+/* port-e9.c */
+void port_e9_init(void);
+
 /* block.c */
 typedef struct BlockDriverState BlockDriverState;
 typedef struct BlockDriver BlockDriver;

[-- Attachment #3: Type: text/plain, Size: 138 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Clean dirty code avoiding warning messages when compiling
  2006-01-18  8:58 Clean dirty code avoiding warning messages when compiling Xue, Haifeng
@ 2006-01-18 13:08 ` Vincent Hanquez
  0 siblings, 0 replies; 2+ messages in thread
From: Vincent Hanquez @ 2006-01-18 13:08 UTC (permalink / raw)
  To: Xue, Haifeng; +Cc: xen-devel

On Wed, Jan 18, 2006 at 04:58:06PM +0800, Xue, Haifeng wrote:
> Clean dirty code avoiding warning messages when compiling
> 
> Signed-off-by: Haifeng Xue <haifeng.xue@intel.com>
>
> -    if (!xs_write(xs, NULL, path, pts, strlen(pts))) {
> +    if (!xs_write(xs, (xs_transaction_t)NULL, path, pts, strlen(pts))) {

Please don't override the type checking with cast to shut up gcc !
The warning is there for a reason, it should be XBT_NULL instead of NULL.

-- 
Vincent Hanquez

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2006-01-18 13:08 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-01-18  8:58 Clean dirty code avoiding warning messages when compiling Xue, Haifeng
2006-01-18 13:08 ` Vincent Hanquez

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.