Re: [libvirt] [PATCH] storage_backend.c: assure clang that inputvol can't be NULL

2009-09-04 Thread Daniel Veillard
On Thu, Sep 03, 2009 at 12:49:25PM +0200, Jim Meyering wrote: > Daniel P. Berrange wrote: > > On Thu, Sep 03, 2009 at 11:18:00AM +0200, Jim Meyering wrote: > >> clang was complaining that a NULL inputvol would be dereferenced > >> in that "could not open..." diagnostic. > >> > >> Since the two sole

Re: [libvirt] [PATCH] storage_backend.c: assure clang that inputvol can't be NULL

2009-09-03 Thread Jim Meyering
Daniel P. Berrange wrote: > On Thu, Sep 03, 2009 at 11:18:00AM +0200, Jim Meyering wrote: >> clang was complaining that a NULL inputvol would be dereferenced >> in that "could not open..." diagnostic. >> >> Since the two sole callers of this function are careful >> to call it only when inputvol is

Re: [libvirt] [PATCH] storage_backend.c: assure clang that inputvol can't be NULL

2009-09-03 Thread Jim Meyering
Daniel P. Berrange wrote: > On Thu, Sep 03, 2009 at 11:18:00AM +0200, Jim Meyering wrote: >> clang was complaining that a NULL inputvol would be dereferenced >> in that "could not open..." diagnostic. >> >> Since the two sole callers of this function are careful >> to call it only when inputvol is

Re: [libvirt] [PATCH] storage_backend.c: assure clang that inputvol can't be NULL

2009-09-03 Thread Daniel P. Berrange
On Thu, Sep 03, 2009 at 11:18:00AM +0200, Jim Meyering wrote: > clang was complaining that a NULL inputvol would be dereferenced > in that "could not open..." diagnostic. > > Since the two sole callers of this function are careful > to call it only when inputvol is non-NULL, this is a good > case

[libvirt] [PATCH] storage_backend.c: assure clang that inputvol can't be NULL

2009-09-03 Thread Jim Meyering
clang was complaining that a NULL inputvol would be dereferenced in that "could not open..." diagnostic. Since the two sole callers of this function are careful to call it only when inputvol is non-NULL, this is a good case for giving the parameter the nonnull attribute: >From 314278acb021a1f2e6