]> xenbits.xensource.com Git - libvirt.git/commitdiff
Enable use of -Wold-style-definition compiler flag
authorDaniel P. Berrange <berrange@redhat.com>
Fri, 16 Jul 2010 16:30:00 +0000 (17:30 +0100)
committerDaniel P. Berrange <berrange@redhat.com>
Tue, 5 Apr 2011 10:40:04 +0000 (11:40 +0100)
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

m4/virt-compile-warnings.m4
src/xen/xen_hypervisor.c
tests/testutils.c

index 27413b09f233beef9bffa78445f9320422dbdfbc..7e252d551ac62316a4ec4f9f4c3d0bbb590b41e0 100644 (file)
@@ -62,7 +62,6 @@ AC_DEFUN([LIBVIRT_COMPILE_WARNINGS],[
         dontwarn="$dontwarn -Wcast-qual"
         dontwarn="$dontwarn -Wconversion"
         dontwarn="$dontwarn -Wsign-conversion"
-        dontwarn="$dontwarn -Wold-style-definition"
         dontwarn="$dontwarn -Wpacked"
         dontwarn="$dontwarn -Wunused-macros"
         dontwarn="$dontwarn -Woverlength-strings"
index 47355ce951dc240f1cd1ed4c1bc52c7eabf33402..8a9dae5afad5996caa736382f0226da46daa8e89 100644 (file)
@@ -3621,7 +3621,7 @@ xenHypervisorGetVcpuMax(virDomainPtr domain)
  * Return true if the current process should be able to connect to Xen.
  */
 int
-xenHavePrivilege()
+xenHavePrivilege(void)
 {
 #ifdef __sun
     return priv_ineffect (PRIV_XVM_CONTROL);
index 0ce3c7bf56b812a99cce165e2cdec5d91c1b6d24..1f3b5693d49251e1d9cea9b4e66d1b0bcfd95d0a 100644 (file)
@@ -457,14 +457,14 @@ virTestGetFlag(const char *name) {
 }
 
 unsigned int
-virTestGetDebug() {
+virTestGetDebug(void) {
     if (testDebug == -1)
         testDebug = virTestGetFlag("VIR_TEST_DEBUG");
     return testDebug;
 }
 
 unsigned int
-virTestGetVerbose() {
+virTestGetVerbose(void) {
     if (testVerbose == -1)
         testVerbose = virTestGetFlag("VIR_TEST_VERBOSE");
     return testVerbose || virTestGetDebug();