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
main
Christian Göttsche 4 years ago committed by cgzones
parent 3e1908b80a
commit 9a4879b48f
  1. 8
      CRT.c
  2. 2
      MainPanel.c
  3. 2
      MetersPanel.c
  4. 4
      Process.c
  5. 2
      UsersTable.c
  6. 2
      XUtils.c
  7. 4
      linux/Platform.c

@ -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);
}

@ -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));

@ -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;

@ -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();

@ -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;

Loading…
Cancel
Save