WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-ppc-devel

[XenPPC] [patch] remove gcc4 warnings

To: hollisb@xxxxxxxxxx, jimix@xxxxxxxxxxxxxx
Subject: [XenPPC] [patch] remove gcc4 warnings
From: Olof Johansson <olof@xxxxxxxxx>
Date: Wed, 11 Jan 2006 12:08:47 -0600
Delivery-date: Thu, 23 Feb 2006 20:27:11 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-ppc-devel-request@lists.xensource.com?subject=help>
List-id: Xen PPC development <xen-ppc-devel.lists.xensource.com>
List-post: <mailto:xen-ppc-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ppc-devel>, <mailto:xen-ppc-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ppc-devel>, <mailto:xen-ppc-devel-request@lists.xensource.com?subject=unsubscribe>
Resent-date: Thu, 23 Feb 2006 15:26:46 -0500
Resent-from: Jimi Xenidis <jimix@xxxxxxxxxxxxxx>
Resent-message-id: <20060111180847.GF2491@xxxxxxxxxxxxxx>
Resent-to: xen-ppc-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-ppc-devel-bounces@xxxxxxxxxxxxxxxxxxx
*** JIMI SAYS ***
Got this a while ago, am posting it for discussion, not sure how I feel about it
***

Hi,

I build with gcc 4.0.1, and it pops a few warnings, mostly about sign
errors.

Besides these, I got one in the U3 code that I wasn't able to kill. I'll
follow up about that in a separate email but it doesn't hurt me as much
since I don't have U3 on my machine. :)

---

Remove various warnings that pops with gcc 4. All are PPC-specific
besides the last one.

Signed-off-by: Olof Johansson <olof@xxxxxxxxx>

diff -r 68b820a7018a xen/arch/ppc/boot_of.c
--- a/xen/arch/ppc/boot_of.c    Tue Jan 10 15:59:47 2006
+++ b/xen/arch/ppc/boot_of.c    Wed Jan 11 12:04:14 2006
@@ -58,7 +58,7 @@
extern s32 prom_call(void *arg, ulong rtas_base, ulong func, ulong msr);

 static int __init of_call(
-    const char *service, u32 nargs, u32 nrets, u32 rets[], ...)
+    const char *service, u32 nargs, u32 nrets, s32 rets[], ...)
 {
     int rc;

diff -r 68b820a7018a xen/arch/ppc/mm.c
--- a/xen/arch/ppc/mm.c Tue Jan 10 15:59:47 2006
+++ b/xen/arch/ppc/mm.c Wed Jan 11 12:04:14 2006
@@ -109,7 +109,7 @@
 {
     ulong rmo_base_mfn = d->arch.rmo_base >> PAGE_SHIFT;
     ulong rmo_len_mfn = d->arch.rmo_len >> PAGE_SHIFT;
-    ulong mfn;
+    ulong mfn = 0;
     int t;

     if (pfn >= d->arch.shared_base_pfn &&
diff -r 68b820a7018a xen/arch/ppc/of_handler/console.c
--- a/xen/arch/ppc/of_handler/console.c Tue Jan 10 15:59:47 2006
+++ b/xen/arch/ppc/of_handler/console.c Wed Jan 11 12:04:14 2006
@@ -100,7 +100,7 @@
 static s32 ofh_xen_dom0_read(void *buf, u32 count)
 {
     s32 rc;
-    char *s;
+    char *s = 0;
     s32 ret = 0;

     while (count > 0) {
diff -r 68b820a7018a xen/arch/ppc/of_handler/control.c
--- a/xen/arch/ppc/of_handler/control.c Tue Jan 10 15:59:47 2006
+++ b/xen/arch/ppc/of_handler/control.c Wed Jan 11 12:04:14 2006
@@ -48,7 +48,7 @@
         ulong b)
 {
     static const char msg[] = "OFH: exit method called\n";
-    u32 dummy;
+    s32 dummy;

     ofh_cons_write(DRELA(&msg[0], b), sizeof (msg), &dummy);

diff -r 68b820a7018a xen/arch/ppc/of_handler/devtree.c
--- a/xen/arch/ppc/of_handler/devtree.c Tue Jan 10 15:59:47 2006
+++ b/xen/arch/ppc/of_handler/devtree.c Wed Jan 11 12:04:14 2006
@@ -26,7 +26,7 @@
     if (nargs == 1) {
         if (nrets == 1) {
             ofdn_t ph = argp[0];
-            u32 *sib_ph = &retp[0];
+            s32 *sib_ph = &retp[0];
             void *mem = ofd_mem(b);

             *sib_ph = ofd_node_peer(mem, ph);
@@ -42,7 +42,7 @@
     if (nargs == 1) {
         if (nrets == 1) {
             ofdn_t ph = argp[0];
-            u32 *ch_ph = &retp[0];
+            s32 *ch_ph = &retp[0];
             void *mem = ofd_mem(b);

             *ch_ph = ofd_node_child(mem, ph);
@@ -58,7 +58,7 @@
     if (nargs == 1) {
         if (nrets == 1) {
             ofdn_t ph = argp[0];
-            u32 *parent_ph = &retp[0];
+            s32 *parent_ph = &retp[0];
             void *mem = ofd_mem(b);

             *parent_ph = ofd_node_parent(mem, ph);
@@ -76,7 +76,7 @@
         if (nrets == 1) {
             struct ofh_ihandle *ih =
                 (struct ofh_ihandle *)(ulong)argp[0];
-            u32 *p = &retp[0];
+            s32 *p = &retp[0];

             *p = (s32)ih->ofi_node;
             return OF_SUCCESS;
@@ -173,7 +173,7 @@
             const char *dev_spec = (const char *)(ulong)argp[0];
             char *buf = (char *)(ulong)argp[1];
             u32 sz = argp[2];
-            u32 *len = &retp[0];
+            s32 *len = &retp[0];
             void *mem = ofd_mem(b);
             ofdn_t ph;

@@ -227,7 +227,7 @@
                 (struct ofh_ihandle *)((ulong)argp[0]);
             char *buf = (char *)(ulong)argp[1];
             u32 sz = argp[2];
-            u32 *len = &retp[0];
+            s32 *len = &retp[0];
             ofdn_t ph;
             void *mem = ofd_mem(b);

diff -r 68b820a7018a xen/arch/ppc/of_handler/io.c
--- a/xen/arch/ppc/of_handler/io.c      Tue Jan 10 15:59:47 2006
+++ b/xen/arch/ppc/of_handler/io.c      Wed Jan 11 12:04:14 2006
@@ -25,7 +25,7 @@
     if (nargs == 1) {
         if (nrets == 1) {
             const char *devspec = (const char *)(ulong)argp[0];
-            u32 *ih = &retp[0];
+            s32 *ih = &retp[0];
             ofdn_t p;
             void *mem = ofd_mem(b);

@@ -72,7 +72,7 @@
             if (ih->ofi_read != NULL) {
                 u32 addr = argp[1];
                 u32 sz = argp[2];
-                u32 *actual = &retp[0];
+                s32 *actual = &retp[0];
                 void *f = ih->ofi_read;

                 if (f != 0) {
@@ -96,7 +96,7 @@
             if (ih->ofi_write != NULL) {
                 u32 addr = argp[1];
                 u32 sz = argp[2];
-                u32 *actual = &retp[0];
+                s32 *actual = &retp[0];
                 void *f = ih->ofi_write;

                 if (f != 0) {
diff -r 68b820a7018a xen/arch/ppc/of_handler/memory.c
--- a/xen/arch/ppc/of_handler/memory.c  Tue Jan 10 15:59:47 2006
+++ b/xen/arch/ppc/of_handler/memory.c  Wed Jan 11 12:04:14 2006
@@ -78,9 +78,9 @@
             u32 virt = argp[0];
             u32 size = argp[1];
             u32 align = argp[2];
-            u32 *baseaddr = &retp[0];
+            s32 *baseaddr = &retp[0];

-            return claim(b, virt, size, align, baseaddr);
+            return claim(b, virt, size, align, (u32 *)baseaddr);
         }
     }
     return OF_FAILURE;
diff -r 68b820a7018a xen/arch/ppc/of_handler/ofh.c
--- a/xen/arch/ppc/of_handler/ofh.c     Tue Jan 10 15:59:47 2006
+++ b/xen/arch/ppc/of_handler/ofh.c     Wed Jan 11 12:04:14 2006
@@ -67,7 +67,7 @@
     a[13] = '\n';
     a[14] = '\n';

-    u32 actual;
+    s32 actual;
     u32 t = 1;
     volatile u32 *tp = &t;

@@ -325,7 +325,7 @@

         if ((ulong)ofd_mem(b) < (ulong)_end + b) {
             static const char msg[] = "PANIC: OFD and BSS collide\n";
-            u32 dummy;
+            s32 dummy;

             ofh_cons_write(DRELA(&msg[0], b), sizeof (msg), &dummy);
             for (;;);
diff -r 68b820a7018a xen/arch/ppc/of_handler/ofh.h
--- a/xen/arch/ppc/of_handler/ofh.h     Tue Jan 10 15:59:47 2006
+++ b/xen/arch/ppc/of_handler/ofh.h     Wed Jan 11 12:04:14 2006
@@ -114,7 +114,7 @@
 extern s32 ofh_cons_write(const void *buf, u32 count, s32 *actual);
 extern s32 ofh_cons_close(void);
 extern s32 ofh_handler(struct ofh_args *args, ulong ifh_base);
-extern s32 leap(u32 nargs, u32 nrets, u32 args[], u32 rets[],
+extern s32 leap(u32 nargs, u32 nrets, s32 args[], s32 rets[],
                 ulong ba, void *f);

 extern void ofh_vty_init(ofdn_t chosen, ulong b);
diff -r 68b820a7018a xen/arch/ppc/ofd_fixup.c
--- a/xen/arch/ppc/ofd_fixup.c  Tue Jan 10 15:59:47 2006
+++ b/xen/arch/ppc/ofd_fixup.c  Wed Jan 11 12:04:14 2006
@@ -481,7 +481,7 @@
     ofd_cpus_props(m, d);

     printk("Add /chosen props\n");
-    ofd_chosen_props(m, si->cmd_line);
+    ofd_chosen_props(m, (char *)si->cmd_line);

     printk("fix /memory@0 props\n");
     ofd_memory_props(m, d, eoload);
diff -r 68b820a7018a xen/arch/ppc/papr/tce.c
--- a/xen/arch/ppc/papr/tce.c   Tue Jan 10 15:59:47 2006
+++ b/xen/arch/ppc/papr/tce.c   Wed Jan 11 12:04:14 2006
@@ -70,7 +70,7 @@
 #ifdef DEBUG
     printk("%s: liobn: 0x%x ioba: 0x%lx tce: 0x%"
             PRIx64"(0x%"PRIx64") count: %lu\n",
-            __func__, liobn, ioba, tce.tce_dword, tce.tce_bits.tce_rpn,
+ __func__, liobn, ioba, tce.tce_dword, (unsigned long) tce.tce_bits.tce_rpn,
             count);
 #endif
     regs->gprs[3] = H_Function;
diff -r 68b820a7018a xen/common/gdbstub.c
--- a/xen/common/gdbstub.c      Tue Jan 10 15:59:47 2006
+++ b/xen/common/gdbstub.c      Wed Jan 11 12:04:14 2006
@@ -39,7 +39,7 @@
 static ulong in_bytes = 0;    /* how much on in_buf is full */
 static ulong read_bytes = 0;    /* how much of in_buf has been read */

-static unsigned char opt_cdb[30] = "com1";
+static char opt_cdb[30] = "com1";
 string_param("cdb", opt_cdb);

 struct xendbg_context {


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

<Prev in Thread] Current Thread [Next in Thread>
  • [XenPPC] [patch] remove gcc4 warnings, Olof Johansson <=