From 0db309467de40fcf7f899bbe3e70f5ee3917ac36 Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT consult" Date: Wed, 27 Mar 2024 18:57:25 +0100 Subject: [PATCH] xfree86: os-support: bsd: fix warning on old-style function definition MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fix compiler warnings: ../hw/xfree86/os-support/bsd/bsd_VTsw.c: In function ‘xf86VTSwitchPending’: ../hw/xfree86/os-support/bsd/bsd_VTsw.c:56:1: warning: old-style function definition [-Wold-style-definition] 56 | xf86VTSwitchPending() | ^~~~~~~~~~~~~~~~~~~ ./hw/xfree86/os-support/bsd/bsd_VTsw.c: In function ‘xf86VTSwitchAway’: ./hw/xfree86/os-support/bsd/bsd_VTsw.c:67:1: warning: old-style function definition [-Wold-style-definition] 67 | xf86VTSwitchAway() | ^~~~~~~~~~~~~~~~ ../hw/xfree86/os-support/bsd/bsd_VTsw.c: In function ‘xf86VTSwitchTo’: ../hw/xfree86/os-support/bsd/bsd_VTsw.c:82:1: warning: old-style function definition [-Wold-style-definition] 82 | xf86VTSwitchTo() | ^~~~~~~~~~~~~~ ../hw/xfree86/os-support/bsd/bsd_init.c: In function ‘xf86OpenConsole’: ../hw/xfree86/os-support/bsd/bsd_init.c:153:1: warning: old-style function definition [-Wold-style-definition] 153 | xf86OpenConsole() | ^~~~~~~~~~~~~~~ ../hw/xfree86/os-support/bsd/bsd_init.c: In function ‘xf86OpenPccons’: ../hw/xfree86/os-support/bsd/bsd_init.c:320:1: warning: old-style function definition [-Wold-style-definition] 320 | xf86OpenPccons() | ^~~~~~~~~~~~~~ ../hw/xfree86/os-support/bsd/bsd_init.c: In function ‘xf86OpenPcvt’: ../hw/xfree86/os-support/bsd/bsd_init.c:451:1: warning: old-style function definition [-Wold-style-definition] 451 | xf86OpenPcvt() | ^~~~~~~~~~~~ ../hw/xfree86/os-support/bsd/bsd_init.c: In function ‘xf86OpenWScons’: ../hw/xfree86/os-support/bsd/bsd_init.c:563:1: warning: old-style function definition [-Wold-style-definition] 563 | xf86OpenWScons() | ^~~~~~~~~~~~~~ ../hw/xfree86/os-support/bsd/bsd_init.c: In function ‘xf86CloseConsole’: ../hw/xfree86/os-support/bsd/bsd_init.c:594:1: warning: old-style function definition [-Wold-style-definition] 594 | xf86CloseConsole() | ^~~~~~~~~~~~~~~~ ../hw/xfree86/os-support/bsd/bsd_init.c: In function ‘xf86UseMsg’: ../hw/xfree86/os-support/bsd/bsd_init.c:671:1: warning: old-style function definition [-Wold-style-definition] 671 | xf86UseMsg() | ^~~~~~~~~~ Signed-off-by: Enrico Weigelt, metux IT consult Part-of: --- hw/xfree86/os-support/bsd/bsd_VTsw.c | 6 +++--- hw/xfree86/os-support/bsd/bsd_init.c | 14 +++++++------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/hw/xfree86/os-support/bsd/bsd_VTsw.c b/hw/xfree86/os-support/bsd/bsd_VTsw.c index 0ee51de2f..b9afb9889 100644 --- a/hw/xfree86/os-support/bsd/bsd_VTsw.c +++ b/hw/xfree86/os-support/bsd/bsd_VTsw.c @@ -53,7 +53,7 @@ xf86VTRequest(int sig) } Bool -xf86VTSwitchPending() +xf86VTSwitchPending(void) { #if defined (SYSCONS_SUPPORT) || defined (PCVT_SUPPORT) if (xf86Info.consType == SYSCONS || xf86Info.consType == PCVT) { @@ -64,7 +64,7 @@ xf86VTSwitchPending() } Bool -xf86VTSwitchAway() +xf86VTSwitchAway(void) { #if defined (SYSCONS_SUPPORT) || defined (PCVT_SUPPORT) if (xf86Info.consType == SYSCONS || xf86Info.consType == PCVT) { @@ -79,7 +79,7 @@ xf86VTSwitchAway() } Bool -xf86VTSwitchTo() +xf86VTSwitchTo(void) { #if defined (SYSCONS_SUPPORT) || defined (PCVT_SUPPORT) if (xf86Info.consType == SYSCONS || xf86Info.consType == PCVT) { diff --git a/hw/xfree86/os-support/bsd/bsd_init.c b/hw/xfree86/os-support/bsd/bsd_init.c index 100683a21..4c8dda644 100644 --- a/hw/xfree86/os-support/bsd/bsd_init.c +++ b/hw/xfree86/os-support/bsd/bsd_init.c @@ -150,7 +150,7 @@ static xf86ConsOpen_t xf86ConsTab[] = { }; void -xf86OpenConsole() +xf86OpenConsole(void) { int i, fd = -1; xf86ConsOpen_t *driver; @@ -317,7 +317,7 @@ xf86OpenConsole() #ifdef PCCONS_SUPPORT static int -xf86OpenPccons() +xf86OpenPccons(void) { int fd = -1; @@ -342,7 +342,7 @@ xf86OpenPccons() #ifdef SYSCONS_SUPPORT static int -xf86OpenSyscons() +xf86OpenSyscons(void) { int fd = -1; vtmode_t vtmode; @@ -448,7 +448,7 @@ xf86OpenSyscons() #ifdef PCVT_SUPPORT static int -xf86OpenPcvt() +xf86OpenPcvt(void) { /* This looks much like syscons, since pcvt is API compatible */ int fd = -1; @@ -560,7 +560,7 @@ xf86OpenPcvt() #ifdef WSCONS_SUPPORT static int -xf86OpenWScons() +xf86OpenWScons(void) { int fd = -1; int mode = WSDISPLAYIO_MODE_MAPPED; @@ -591,7 +591,7 @@ xf86OpenWScons() #endif /* WSCONS_SUPPORT */ void -xf86CloseConsole() +xf86CloseConsole(void) { #if defined(SYSCONS_SUPPORT) || defined(PCVT_SUPPORT) struct vt_mode VT; @@ -668,7 +668,7 @@ xf86ProcessArgument(int argc, char *argv[], int i) } void -xf86UseMsg() +xf86UseMsg(void) { #if defined (SYSCONS_SUPPORT) || defined (PCVT_SUPPORT) ErrorF("vtXX use the specified VT number (1-12)\n");