diff options
author | Christian Göttsche <cgzones@googlemail.com> | 2022-08-04 21:09:44 +0200 |
---|---|---|
committer | cgzones <cgzones@googlemail.com> | 2022-08-09 20:30:05 +0200 |
commit | 9a4879b48f9ca1a39aa4eaa67bccc171cd5bca35 (patch) | |
tree | ea05b3a733209b83bcebc40a8f8af120ac8ebfca | |
parent | 3e1908b80ab214b7b449b49183d1bd5d39c174e3 (diff) |
Please Clang 15
CRT.c:1015:14: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
void CRT_done() {
^
void
-rw-r--r-- | CRT.c | 8 | ||||
-rw-r--r-- | MainPanel.c | 2 | ||||
-rw-r--r-- | MetersPanel.c | 2 | ||||
-rw-r--r-- | Process.c | 4 | ||||
-rw-r--r-- | UsersTable.c | 2 | ||||
-rw-r--r-- | XUtils.c | 2 | ||||
-rw-r--r-- | linux/Platform.c | 4 |
7 files changed, 12 insertions, 12 deletions
@@ -1012,7 +1012,7 @@ IGNORE_WCASTQUAL_END CRT_degreeSign = initDegreeSign(); } -void CRT_done() { +void CRT_done(void) { int resetColor = CRT_colors ? CRT_colors[RESET_COLOR] : CRT_colorSchemes[COLORSCHEME_DEFAULT][RESET_COLOR]; attron(resetColor); @@ -1033,7 +1033,7 @@ void CRT_fatalError(const char* note) { exit(2); } -int CRT_readKey() { +int CRT_readKey(void) { nocbreak(); cbreak(); nodelay(stdscr, FALSE); @@ -1042,13 +1042,13 @@ int CRT_readKey() { return ret; } -void CRT_disableDelay() { +void CRT_disableDelay(void) { nocbreak(); cbreak(); nodelay(stdscr, TRUE); } -void CRT_enableDelay() { +void CRT_enableDelay(void) { halfdelay(*CRT_delay); } diff --git a/MainPanel.c b/MainPanel.c index 44915dfd..b231fbcb 100644 --- a/MainPanel.c +++ b/MainPanel.c @@ -210,7 +210,7 @@ const PanelClass MainPanel_class = { .printHeader = MainPanel_printHeader }; -MainPanel* MainPanel_new() { +MainPanel* MainPanel_new(void) { MainPanel* this = AllocThis(MainPanel); Panel_init((Panel*) this, 1, 1, 1, 1, Class(Process), false, FunctionBar_new(Settings_isReadonly() ? MainFunctions_ro : MainFunctions, NULL, NULL)); this->keys = xCalloc(KEY_MAX, sizeof(Htop_Action)); diff --git a/MetersPanel.c b/MetersPanel.c index 97da6309..c6926140 100644 --- a/MetersPanel.c +++ b/MetersPanel.c @@ -33,7 +33,7 @@ static const char* const MetersMovingKeys[] = {"Space", "Enter", "Up", "Dn", "<- static const int MetersMovingEvents[] = {' ', 13, KEY_UP, KEY_DOWN, KEY_LEFT, KEY_RIGHT, ERR, KEY_DC, KEY_F(10)}; static FunctionBar* Meters_movingBar = NULL; -void MetersPanel_cleanup() { +void MetersPanel_cleanup(void) { if (Meters_movingBar) { FunctionBar_delete(Meters_movingBar); Meters_movingBar = NULL; @@ -44,7 +44,7 @@ static uid_t Process_getuid = (uid_t)-1; int Process_pidDigits = PROCESS_MIN_PID_DIGITS; int Process_uidDigits = PROCESS_MIN_UID_DIGITS; -void Process_setupColumnWidths() { +void Process_setupColumnWidths(void) { int maxPid = Platform_getMaxPid(); if (maxPid == -1) return; @@ -1240,7 +1240,7 @@ void Process_updateExe(Process* this, const char* exe) { uint8_t Process_fieldWidths[LAST_PROCESSFIELD] = { 0 }; -void Process_resetFieldWidths() { +void Process_resetFieldWidths(void) { for (size_t i = 0; i < LAST_PROCESSFIELD; i++) { if (!Process_fields[i].autoWidth) continue; diff --git a/UsersTable.c b/UsersTable.c index 8c4a0ed0..6586a4b9 100644 --- a/UsersTable.c +++ b/UsersTable.c @@ -17,7 +17,7 @@ in the source distribution for its full text. #include "XUtils.h" -UsersTable* UsersTable_new() { +UsersTable* UsersTable_new(void) { UsersTable* this; this = xMalloc(sizeof(UsersTable)); this->users = Hashtable_new(10, true); @@ -21,7 +21,7 @@ in the source distribution for its full text. #include "CRT.h" -void fail() { +void fail(void) { CRT_done(); abort(); diff --git a/linux/Platform.c b/linux/Platform.c index 38b66e83..e442e14b 100644 --- a/linux/Platform.c +++ b/linux/Platform.c @@ -250,7 +250,7 @@ const MeterClass* const Platform_meterTypes[] = { NULL }; -int Platform_getUptime() { +int Platform_getUptime(void) { double uptime = 0; FILE* fd = fopen(PROCDIR "/uptime", "r"); if (fd) { @@ -285,7 +285,7 @@ err: *fifteen = NAN; } -int Platform_getMaxPid() { +int Platform_getMaxPid(void) { FILE* file = fopen(PROCDIR "/sys/kernel/pid_max", "r"); if (!file) return -1; |