mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
Enable use of -Wold-style-definition compiler flag
A couple of functions were declared using the old style foo() for no-parameters, instead of foo(void) * src/xen/xen_hypervisor.c, tests/testutils.c: Replace () with (void) in some function declarations * m4/virt-compile-warnings.m4: Enable -Wold-style-definition
This commit is contained in:
parent
329e9dc629
commit
a4e37ff1a3
@ -62,7 +62,6 @@ AC_DEFUN([LIBVIRT_COMPILE_WARNINGS],[
|
|||||||
dontwarn="$dontwarn -Wcast-qual"
|
dontwarn="$dontwarn -Wcast-qual"
|
||||||
dontwarn="$dontwarn -Wconversion"
|
dontwarn="$dontwarn -Wconversion"
|
||||||
dontwarn="$dontwarn -Wsign-conversion"
|
dontwarn="$dontwarn -Wsign-conversion"
|
||||||
dontwarn="$dontwarn -Wold-style-definition"
|
|
||||||
dontwarn="$dontwarn -Wpacked"
|
dontwarn="$dontwarn -Wpacked"
|
||||||
dontwarn="$dontwarn -Wunused-macros"
|
dontwarn="$dontwarn -Wunused-macros"
|
||||||
dontwarn="$dontwarn -Woverlength-strings"
|
dontwarn="$dontwarn -Woverlength-strings"
|
||||||
|
@ -3621,7 +3621,7 @@ xenHypervisorGetVcpuMax(virDomainPtr domain)
|
|||||||
* Return true if the current process should be able to connect to Xen.
|
* Return true if the current process should be able to connect to Xen.
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
xenHavePrivilege()
|
xenHavePrivilege(void)
|
||||||
{
|
{
|
||||||
#ifdef __sun
|
#ifdef __sun
|
||||||
return priv_ineffect (PRIV_XVM_CONTROL);
|
return priv_ineffect (PRIV_XVM_CONTROL);
|
||||||
|
@ -457,14 +457,14 @@ virTestGetFlag(const char *name) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
unsigned int
|
unsigned int
|
||||||
virTestGetDebug() {
|
virTestGetDebug(void) {
|
||||||
if (testDebug == -1)
|
if (testDebug == -1)
|
||||||
testDebug = virTestGetFlag("VIR_TEST_DEBUG");
|
testDebug = virTestGetFlag("VIR_TEST_DEBUG");
|
||||||
return testDebug;
|
return testDebug;
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned int
|
unsigned int
|
||||||
virTestGetVerbose() {
|
virTestGetVerbose(void) {
|
||||||
if (testVerbose == -1)
|
if (testVerbose == -1)
|
||||||
testVerbose = virTestGetFlag("VIR_TEST_VERBOSE");
|
testVerbose = virTestGetFlag("VIR_TEST_VERBOSE");
|
||||||
return testVerbose || virTestGetDebug();
|
return testVerbose || virTestGetDebug();
|
||||||
|
Loading…
Reference in New Issue
Block a user