]> git.ipfire.org Git - thirdparty/libvirt.git/commit
libxl: avoid compiler warning
authorEric Blake <eblake@redhat.com>
Tue, 5 Apr 2011 16:07:57 +0000 (10:07 -0600)
committerEric Blake <eblake@redhat.com>
Tue, 5 Apr 2011 17:09:12 +0000 (11:09 -0600)
commit3eb869a04bdeaddbe10e74568540e865fb79e412
tree3862744b61204d0b18aeb511fa91fcda5fb461b6
parenta7e80bde110d2dfc19c41cf805a5f555d204b849
libxl: avoid compiler warning

cc1: warnings being treated as errors
libxl/libxl_driver.c: In function 'libxlDomainSetVcpusFlags':
libxl/libxl_driver.c:1570:14: error: cast from function call of type 'double' to non-matching type 'unsigned int' [-Wbad-function-cast]
libxl/libxl_driver.c:1578:15: error: cast from function call of type 'double' to non-matching type 'unsigned int' [-Wbad-function-cast]

This was the only use of floor() and ceil(), and floating-point
is overkill for power-of-two manipulations.

* src/libxl/libxl_driver.c (libxlDomainSetVcpusFlags): Avoid -lm
for trivial computations.
src/libxl/libxl_driver.c