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] Re: Xen 4.1.0 RC2 released

To: M A Young <m.a.young@xxxxxxxxxxxx>
Subject: [Xen-devel] Re: Xen 4.1.0 RC2 released
From: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
Date: Wed, 26 Jan 2011 15:00:29 +0000
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx, Keir Fraser <keir@xxxxxxx>, Stabellini <stefano.stabellini@xxxxxxxxxxxxx>, Stefano
Delivery-date: Wed, 26 Jan 2011 07:01:44 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <alpine.LFD.2.02.1101252217580.19454@xxxxxxxxxxxxxxx>
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/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Newsgroups: chiark.mail.xen.devel
References: <alpine.LFD.2.02.1101252217580.19454@xxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
M A Young writes ("[Xen-devel] Re: Xen 4.1.0 RC2 released"):
> I get the following failure building 
> xen-4.1.0/stubdom/mini-os-x86_64-ioemu/lib/sys.o
> 
> cc1: warnings being treated as errors
> lib/sys.c: In function 'open_savefile':

These do seem to be genuine bugs.  I don't know why our compiler
doesn't warn or fail on this.  Can you try this patch ?


stubdom, minios: correct mistakes in types causing compilation failures

open_savefile ignores its path argument so it can be const char *.
The buffer is nodename is a buffer of characters.
Arithmetic on void*'s is not permitted.

Reported-by: M A Young <m.a.young@xxxxxxxxxxxx>
Signed-off-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>

diff -r 67d5b8004947 extras/mini-os/lib/sys.c
--- a/extras/mini-os/lib/sys.c  Wed Jan 26 11:58:45 2011 +0000
+++ b/extras/mini-os/lib/sys.c  Wed Jan 26 14:58:53 2011 +0000
@@ -178,10 +178,10 @@ int posix_openpt(int flags)
     return(dev->fd);
 }
 
-int open_savefile(char *path, int save)
+int open_savefile(const char *path, int save)
 {
     struct consfront_dev *dev;
-    char *nodename[64];
+    char nodename[64];
 
     snprintf(nodename, sizeof(nodename), "device/console/%d", save ? 
SAVE_CONSOLE : RESTORE_CONSOLE);
 
@@ -286,7 +286,7 @@ int write(int fd, const void *buf, size_
                 while (nbytes > 0) {
                     ret = xencons_ring_send(files[fd].cons.dev, (char *)buf, 
nbytes);
                     nbytes -= ret;
-                    buf += ret;
+                    buf = (char*)buf + ret;
                 }
                 return tot - nbytes;
             }

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

<Prev in Thread] Current Thread [Next in Thread>