All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: Xen 4.1.0 RC2 released
@ 2011-01-25 22:34 M A Young
  2011-01-26 15:00 ` Ian Jackson
  0 siblings, 1 reply; 4+ messages in thread
From: M A Young @ 2011-01-25 22:34 UTC (permalink / raw)
  To: Keir Fraser; +Cc: xen-devel, Stefano Stabellini

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':
lib/sys.c:186:5: error: passing argument 1 of 'snprintf' from incompatible 
pointer type
/home/michael/rpmbuild/BUILD/xen-4.1.0/stubdom/cross-root-x86_64/x86_64-xen-elf/include/stdio.h:264:5: 
note: expected 'char *' but argument is of type 'char **'
lib/sys.c:188:5: error: passing argument 1 of 'init_consfront' from 
incompatible pointer type
/home/michael/rpmbuild/BUILD/xen-4.1.0/stubdom/../extras/mini-os/include/mini-os/console.h:82:23: 
note: expected 'char *' but argument is of type 'char **'
lib/sys.c: In function 'open':
lib/sys.c:213:9: error: passing argument 1 of 'open_savefile' discards 
qualifiers from pointer target type
lib/sys.c:181:5: note: expected 'char *' but argument is of type 'const 
char *'
lib/sys.c: In function 'write':
lib/sys.c:289:25: error: pointer of type 'void *' used in arithmetic
make[2]: *** 
[/home/michael/rpmbuild/BUILD/xen-4.1.0/stubdom/mini-os-x86_64-ioemu/lib/sys.o] 
Error 1
make[2]: Leaving directory 
`/home/michael/rpmbuild/BUILD/xen-4.1.0/extras/mini-os'
make[1]: *** [ioemu-stubdom] Error 2

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

* Re: Xen 4.1.0 RC2 released
  2011-01-25 22:34 Xen 4.1.0 RC2 released M A Young
@ 2011-01-26 15:00 ` Ian Jackson
  2011-01-26 23:05   ` M A Young
  0 siblings, 1 reply; 4+ messages in thread
From: Ian Jackson @ 2011-01-26 15:00 UTC (permalink / raw)
  To: M A Young; +Cc: xen-devel, Keir Fraser, Stabellini, Stefano

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@durham.ac.uk>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>

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;
             }

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

* Re: Re: Xen 4.1.0 RC2 released
  2011-01-26 15:00 ` Ian Jackson
@ 2011-01-26 23:05   ` M A Young
  0 siblings, 0 replies; 4+ messages in thread
From: M A Young @ 2011-01-26 23:05 UTC (permalink / raw)
  To: Ian Jackson; +Cc: xen-devel, Keir Fraser, Stefano Stabellini

On Wed, 26 Jan 2011, Ian Jackson wrote:

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

Yes it works.

 	Michael Young

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

* Xen 4.1.0 RC2 released
@ 2011-01-25 14:14 Keir Fraser
  0 siblings, 0 replies; 4+ messages in thread
From: Keir Fraser @ 2011-01-25 14:14 UTC (permalink / raw)
  To: xen-devel

Folks,

I've just tagged 4.1.0-rc2 in http://xenbits.xen.org/staging/xen-unstable.hg

Please test this new release candidate!

 -- Keir

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

end of thread, other threads:[~2011-01-26 23:05 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-01-25 22:34 Xen 4.1.0 RC2 released M A Young
2011-01-26 15:00 ` Ian Jackson
2011-01-26 23:05   ` M A Young
  -- strict thread matches above, loose matches on Subject: below --
2011-01-25 14:14 Keir Fraser

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.