[libvirt] [PATCH] libxl: fix unused functions

Roman Bogorodskiy bogorodskiy at gmail.com
Tue Aug 16 00:35:08 UTC 2016


  Michal Privoznik wrote:

> On 14.08.2016 04:37, Roman Bogorodskiy wrote:
> > Commit eee7bd4e introduced two functions: libxlDiskPathToID and
> > libxlDiskSectorSize.
> > 
> > However, as they're used only by code under #ifdef __linux__,
> > on non-Linux platforms it results in errors similar to this:
> > 
> >  CC       libxl/libvirt_driver_libxl_impl_la-libxl_driver.lo
> > libxl/libxl_driver.c:5263:1: error: unused function 'libxlDiskPathToID' [-Werror,-Wunused-function]
> > libxlDiskPathToID(const char *virtpath)
> > ^
> > libxl/libxl_driver.c:5312:1: error: unused function 'libxlDiskSectorSize' [-Werror,-Wunused-function]
> > libxlDiskSectorSize(int domid, int devno)
> > ^
> > 2 errors generated.
> > 
> > Fix that by moving these functions under the #ifdef __linux__ block.
> > ---
> >  src/libxl/libxl_driver.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/src/libxl/libxl_driver.c b/src/libxl/libxl_driver.c
> > index 4957072..1170062 100644
> > --- a/src/libxl/libxl_driver.c
> > +++ b/src/libxl/libxl_driver.c
> 
> ACK

Pushed, thanks!

> Michal

Roman Bogorodskiy
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20160816/c1aa9c99/attachment-0001.sig>


More information about the libvir-list mailing list