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

Daniel Veillard veillard at redhat.com
Fri Sep 4 14:10:47 UTC 2009


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 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:
> 
> When I recompiled everything, this patch needed adjustment.
> For example, I had to include internal.h for the definition
> of ATTRIBUTE_NONNULL.

  ACK
  thanks !

Daniel

-- 
Daniel Veillard      | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
daniel at veillard.com  | Rpmfind RPM search engine http://rpmfind.net/
http://veillard.com/ | virtualization library  http://libvirt.org/




More information about the libvir-list mailing list