From 2ba641e5f3879593e36fa84872289872a4060d03 Mon Sep 17 00:00:00 2001 From: Sami Kerola Date: Sun, 12 Feb 2017 00:19:33 +0000 Subject: misc: add static keyword to where needed [smatch scan] text-utils/rev.c:68:9: warning: symbol 'buf' was not declared. Should it be static? Signed-off-by: Sami Kerola --- text-utils/ul.c | 45 ++++++++++++++++++++++----------------------- 1 file changed, 22 insertions(+), 23 deletions(-) (limited to 'text-utils/ul.c') diff --git a/text-utils/ul.c b/text-utils/ul.c index de6da8178..178d5cb7f 100644 --- a/text-utils/ul.c +++ b/text-utils/ul.c @@ -70,7 +70,6 @@ static int put1wc(int c) #define putwp(s) putp(s) #endif -static void usage(FILE *out); static int handle_escape(FILE * f); static void filter(FILE *f); static void flushln(void); @@ -101,33 +100,33 @@ static void print_out(char *line); #define UNDERL 010 /* Ul */ #define BOLD 020 /* Bold */ -int must_use_uc, must_overstrike; -char *CURS_UP, - *CURS_RIGHT, - *CURS_LEFT, - *ENTER_STANDOUT, - *EXIT_STANDOUT, - *ENTER_UNDERLINE, - *EXIT_UNDERLINE, - *ENTER_DIM, - *ENTER_BOLD, - *ENTER_REVERSE, - *UNDER_CHAR, - *EXIT_ATTRIBUTES; - -struct CHAR { +static int must_use_uc, must_overstrike; +static char *CURS_UP, + *CURS_RIGHT, + *CURS_LEFT, + *ENTER_STANDOUT, + *EXIT_STANDOUT, + *ENTER_UNDERLINE, + *EXIT_UNDERLINE, + *ENTER_DIM, + *ENTER_BOLD, + *ENTER_REVERSE, + *UNDER_CHAR, + *EXIT_ATTRIBUTES; + +struct CHAR { char c_mode; wchar_t c_char; int c_width; }; -struct CHAR *obuf; -int obuflen; -int col, maxcol; -int mode; -int halfpos; -int upln; -int iflag; +static struct CHAR *obuf; +static int obuflen; +static int col, maxcol; +static int mode; +static int halfpos; +static int upln; +static int iflag; static void __attribute__((__noreturn__)) usage(FILE *out) -- cgit v1.2.3-55-g7522