]> granicus.if.org Git - procps-ng/commitdiff
watch: fix compiler warnings
authorSami Kerola <kerolasa@iki.fi>
Fri, 2 Nov 2012 17:50:58 +0000 (17:50 +0000)
committerCraig Small <csmall@enc.com.au>
Tue, 6 Nov 2012 11:30:02 +0000 (22:30 +1100)
watch.c:255:14: warning: no previous declaration for 'get_time_usec' [-Wmissing-declarations]
watch.c:303:6: warning: no previous declaration for 'output_header' [-Wmissing-declarations]
watch.c:364:5: warning: no previous declaration for 'run_command' [-Wmissing-declarations]

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
watch.c

diff --git a/watch.c b/watch.c
index e454308279b100a34d18f2f6d46068a87dc4758d..0fe0a8fb84d2fc49cbe2c329283fc276fe902b7d 100644 (file)
--- a/watch.c
+++ b/watch.c
@@ -252,7 +252,7 @@ static void get_terminal_size(void)
 /* get current time in usec */
 typedef unsigned long long watch_usec_t;
 #define USECS_PER_SEC (1000000ull)
-watch_usec_t get_time_usec()
+static watch_usec_t get_time_usec()
 {
        struct timeval now;
        gettimeofday(&now, NULL);
@@ -298,9 +298,9 @@ wint_t my_getwc(FILE * s)
 #endif /* WITH_WATCH8BIT */
 
 #ifdef WITH_WATCH8BIT
-void output_header(wchar_t *restrict wcommand, int wcommand_columns, int wcommand_characters, double interval)
+static void output_header(wchar_t *restrict wcommand, int wcommand_columns, int wcommand_characters, double interval)
 #else
-void output_header(char *restrict command, double interval)
+static void output_header(char *restrict command, double interval)
 #endif /* WITH_WATCH8BIT */
 {
        time_t t = time(NULL);
@@ -361,7 +361,7 @@ void output_header(char *restrict command, double interval)
        return;
 }
 
-int run_command(char *restrict command, char **restrict command_argv)
+static int run_command(char *restrict command, char **restrict command_argv)
 {
        FILE *p;
        int x, y;