Re: [libvirt] [PATCH] Fix compiler warnings in test code

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Dec 17, 2008 at 03:17:35PM +0000, Daniel P. Berrange wrote:
> On Tue, Dec 16, 2008 at 06:51:14PM -0800, john.levon@xxxxxxx wrote:
> > # HG changeset patch
> > # User john.levon@xxxxxxx
> > # Date 1229399267 28800
> > # Node ID 1b81ac255ad765ab782829e7fe0a55dc7bab72ab
> > # Parent  ee6ccfc062f49f514d7ae8924d5a596b18441fee
> > Fix compiler warnings in test code
> > 
> > Signed-off-by: John Levon <john.levon@xxxxxxx>
> > 
> > diff --git a/src/test.c b/src/test.c
> > --- a/src/test.c
> > +++ b/src/test.c
> > @@ -1299,7 +1299,7 @@ static unsigned long testGetMaxMemory(vi
> >  static unsigned long testGetMaxMemory(virDomainPtr domain) {
> >      testConnPtr privconn = domain->conn->privateData;
> >      virDomainObjPtr privdom;
> > -    unsigned long ret = -1;
> > +    unsigned long ret = (unsigned long)-1;
> 
> The original code was actually bogus. It should have been
> initialized to '0' as the error return value, rather than
> the current '-1'.

I've committed your patch, with this additional change

Daniel
-- 
|: Red Hat, Engineering, London   -o-   http://people.redhat.com/berrange/ :|
|: http://libvirt.org  -o-  http://virt-manager.org  -o-  http://ovirt.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505  -o-  F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|

--
Libvir-list mailing list
Libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]