Commit 81def204 authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

FlexeLint polishing.

parent c6505ab9
......@@ -186,7 +186,8 @@ do_args(int sock, int argc, char * const *argv)
* to have a global variable.
*/
static int _line_sock;
static void send_line(char *l)
static void __match_proto__()
send_line(char *l)
{
if (l) {
cli_write(_line_sock, l);
......
......@@ -57,7 +57,6 @@
-sem (VBE_DropRefLocked, thread_unlock)
-e454 // mutex not released (...ReleaseLocked)
-e457 // unprotected access
-e777 // float equality comparison
-esym(458, params) // unlocked access
......
......@@ -82,7 +82,7 @@ static double vsl_t0 = 0, vsl_to, vsl_ts = 0;
static pthread_cond_t timebend_cv;
static double log_ten;
static int scales[] = {
static const int scales[] = {
1,
2,
3,
......
......@@ -119,7 +119,6 @@ static WINDOW *w_info = NULL;
static int verbosity = VSC_level_info;
static int keep_running = 1;
static int show_info = 1;
static int hide_unseen = 1;
static int page_start = 0;
static int current = 0;
......@@ -476,7 +475,7 @@ make_windows(void)
l_status = LINES_STATUS;
l_bar_t = LINES_BAR_T;
l_bar_b = LINES_BAR_B;
l_info = (show_info ? LINES_INFO : 0);
l_info = LINES_INFO;
l_points = Y - (l_status + l_bar_t + l_bar_b + l_info);
if (l_points < LINES_POINTS_MIN) {
l_points += l_info;
......@@ -634,7 +633,7 @@ draw_bar_t(void)
}
static void
draw_line_default(WINDOW *w, int y, int x, int X, struct pt *pt)
draw_line_default(WINDOW *w, int y, int x, int X, const struct pt *pt)
{
enum {
COL_CUR,
......@@ -722,7 +721,7 @@ print_trunc(WINDOW *w, uintmax_t val)
}
static void
draw_line_bytes(WINDOW *w, int y, int x, int X, struct pt *pt)
draw_line_bytes(WINDOW *w, int y, int x, int X, const struct pt *pt)
{
enum {
COL_CUR,
......@@ -779,7 +778,7 @@ draw_line_bytes(WINDOW *w, int y, int x, int X, struct pt *pt)
}
static void
draw_line_bitmap(WINDOW *w, int y, int x, int X, struct pt *pt)
draw_line_bitmap(WINDOW *w, int y, int x, int X, const struct pt *pt)
{
int ch;
enum {
......@@ -822,7 +821,7 @@ draw_line_bitmap(WINDOW *w, int y, int x, int X, struct pt *pt)
}
static void
draw_line_duration(WINDOW *w, int y, int x, int X, struct pt *pt)
draw_line_duration(WINDOW *w, int y, int x, int X, const struct pt *pt)
{
enum {
COL_DUR,
......@@ -853,7 +852,7 @@ draw_line_duration(WINDOW *w, int y, int x, int X, struct pt *pt)
}
static void
draw_line(WINDOW *w, int y, struct pt *pt)
draw_line(WINDOW *w, int y, const struct pt *pt)
{
int x, X;
......
......@@ -15,11 +15,22 @@
///////////////////////////////////////////////////////////////////////
// General stylistic issues
-e726 // Extraneous comma ignored
-e641 // Converting enum '...' to int
-e726 // Extraneous comma ignored
-e763 // Redundant declaration for symbol '...' previously declared
-e777 // Testing floats for equality
-e786 // String concatenation within initializer
-esym(818, argv) // Pointer parameter '...' could be declared as pointing to const
/*
* va_list's are opaque for a reason, but we pretend to FlexeLint that it
* is just a void*, so it proposes constification, which is not generally OK,
* for instance on register-spilling architectures.
* XXX: Maybe 'ap' is a badly chosen conventional name here...
*/
-esym(818, ap) // Pointer parameter '...' could be declared as pointing to const
// +e958 // padding
///////////////////////////////////////////////////////////////////////
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment