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-devel

[Xen-devel] [PATCH]mini-os: warnings when compiling with -O

To: Grzegorz Milos <gm281@xxxxxxxxx>
Subject: [Xen-devel] [PATCH]mini-os: warnings when compiling with -O
From: Dietmar Hahn <dietmar.hahn@xxxxxxxxxxxxxxxxxxx>
Date: Fri, 19 Jan 2007 11:47:04 +0100
Cc: xen-devel <Xen-devel@xxxxxxxxxxxxxxxxxxx>, Jacob Gorm Hansen <jacobg@xxxxxxx>
Delivery-date: Fri, 19 Jan 2007 02:47:08 -0800
Domainkey-signature: s=s768; d=fujitsu-siemens.com; c=nofws; q=dns; b=hN1YAq8Pln9814VmD02wZqhesS/tQ3Dbhri9NkrLGoYGwK1Z3PkrwOaJxvTzC0yTeMKVF378fUkjsER/uP7d8g7VHODQX8UXrFBlUinQ4yiVGKlBIB1iSSNFq6dhN60l;
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: KMail/1.9.5
Hi,

I tried compiling mini-os with optimization flag switched on and got some 
warnings leading to errors because of the -Werror flag.
The stuff in netfront.c seems to be forgotten to remove during the update of 
the orginal patch from Jacob. Maybe it's better to remove it.
Thanks.

Dietmar.

Signed-off-by: Dietmar Hahn <dietmar.hahn@xxxxxxxxxxxxxxxxxxx>

# HG changeset patch
# User dietmar.hahn@xxxxxxxxxxxxxxxxxxx
# Date 1169202107 -3600
# Node ID e9c7d2ed782fca937aa15131d42e69cbca32db02
# Parent  e2539ab3580a28a6bebfe7ea4756fb8c6f90a722
Fixed warnings when compiling with -O.

diff -r e2539ab3580a -r e9c7d2ed782f extras/mini-os/arch/x86/mm.c
--- a/extras/mini-os/arch/x86/mm.c      Thu Jan 18 18:54:28 2007 +0000
+++ b/extras/mini-os/arch/x86/mm.c      Fri Jan 19 11:21:47 2007 +0100
@@ -61,6 +61,7 @@ void new_pt_frame(unsigned long *pt_pfn,
     mmu_update_t mmu_updates[1];
     struct mmuext_op pin_request;
     
+    prot_e = prot_t = pincmd = 0;
     DEBUG("Allocating new L%d pt frame for pt_pfn=%lx, "
            "prev_l_mfn=%lx, offset=%lx", 
            level, *pt_pfn, prev_l_mfn, offset);
diff -r e2539ab3580a -r e9c7d2ed782f extras/mini-os/netfront.c
--- a/extras/mini-os/netfront.c Thu Jan 18 18:54:28 2007 +0000
+++ b/extras/mini-os/netfront.c Fri Jan 19 11:21:47 2007 +0100
@@ -327,7 +327,7 @@ done:
     printk("backend at %s\n",backend);
     printk("mac is %s\n",mac);
 
-    char *res;
+    // char *res;
     char path[256];
     sprintf(path,"%s/state",backend);
 
@@ -336,7 +336,7 @@ done:
     xenbus_wait_for_value(path,"4");
 
     //free(backend);
-    free(res);
+    // free(res);
 
     printk("**************************\n");
 
diff -r e2539ab3580a -r e9c7d2ed782f extras/mini-os/xenbus/xenbus.c
--- a/extras/mini-os/xenbus/xenbus.c    Thu Jan 18 18:54:28 2007 +0000
+++ b/extras/mini-os/xenbus/xenbus.c    Fri Jan 19 11:21:47 2007 +0100
@@ -103,7 +103,7 @@ static void xenbus_thread_func(void *ign
 static void xenbus_thread_func(void *ign)
 {
     struct xsd_sockmsg msg;
-    unsigned prod;
+    unsigned prod=0;
 
     for (;;) 
     {

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH]mini-os: warnings when compiling with -O, Dietmar Hahn <=