Skip to content

Commit a1c5fdc

Browse files
Merge pull request #64 from yegorich/fix-prototypes
Resolve -Wstrict-prototypes warning
2 parents 4a12011 + a826570 commit a1c5fdc

3 files changed

Lines changed: 6 additions & 5 deletions

File tree

CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ option(USE_GETTEXT "Enable interantionalization" OFF)
1818
add_compile_options(-Wall -pedantic -Wextra)
1919
add_compile_options(-Werror=unused-label)
2020
add_compile_options(-Werror=unused-parameter)
21+
add_compile_options(-Werror=strict-prototypes)
2122

2223
set(SOURCES
2324
colors.c

error.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,12 +45,12 @@ void set_error(const char *fmt, ...)
4545
va_end(ap);
4646
}
4747

48-
void clear_error()
48+
void clear_error(void)
4949
{
5050
last_error[0] = 0x00;
5151
}
5252

53-
char * get_error()
53+
char * get_error(void)
5454
{
5555
return last_error;
5656
}

nc.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -463,7 +463,7 @@ void draw_rad_column(WINDOW *win, int x, double val)
463463
}
464464
}
465465

466-
double get_cur_scc()
466+
double get_cur_scc(void)
467467
{
468468
double scc_val = 0.0;
469469
double prev_val = 0.0, u0 = 0.0;
@@ -593,7 +593,7 @@ void draw_fft(void)
593593
}
594594
#endif
595595

596-
double calc_trend()
596+
double calc_trend(void)
597597
{
598598
int half = history_n / 2, index = 0;
599599
double v1 = 0.0, v2 = 0.0;
@@ -626,7 +626,7 @@ double calc_trend()
626626
return (v1 - v2) / (v2 / 100.0);
627627
}
628628

629-
void draw_graph()
629+
void draw_graph(void)
630630
{
631631
int index = 0, loop_n = min(max_x, history_n), n = 0, n2 = 0;
632632
double avg = 0, sd = 0;

0 commit comments

Comments
 (0)