# HG changeset patch # User Jim Meyering # Date 1314801809 -7200 # Node ID 8e204a155dabf83a4ce226e2e5ce6ae407277aa6 # Parent 9ad43fa113ac53251bb66f8cf1c9d6447d5cad20 test-parse-datetime.c: accommodate a relatively strict gcc warning * tests/test-parse-datetime.c (gmt_offset): Declare function "static", to avoid a warning from gcc's -Werror=missing-declarations. Insert a few spaces-before-funcall-parenthesis. diff --git a/ChangeLog b/ChangeLog --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2011-08-31 Jim Meyering + + test-parse-datetime.c: accommodate a relatively strict gcc warning + * tests/test-parse-datetime.c (gmt_offset): Declare function "static", + to avoid a warning from gcc's -Werror=missing-declarations. + Insert a few spaces-before-funcall-parenthesis. + 2011-08-17 J.T. Conklin parse-datetime: accept ISO 8601 date and time rep with "T" separator diff --git a/tests/test-parse-datetime.c b/tests/test-parse-datetime.c --- a/tests/test-parse-datetime.c +++ b/tests/test-parse-datetime.c @@ -36,7 +36,7 @@ #define LOG(str, now, res) (void) 0 #endif -static const char* const day_table[] = +static const char *const day_table[] = { "SUNDAY", "MONDAY", @@ -93,21 +93,21 @@ } #endif /* ! HAVE_TM_GMTOFF */ -long -gmt_offset() +static long +gmt_offset () { time_t now; long gmtoff; - time(&now); + time (&now); #if !HAVE_TM_GMTOFF - struct tm tm_local = *localtime(&now); - struct tm tm_gmt = *gmtime(&now); + struct tm tm_local = *localtime (&now); + struct tm tm_gmt = *gmtime (&now); - gmtoff = tm_diff(&tm_local, &tm_gmt); + gmtoff = tm_diff (&tm_local, &tm_gmt); #else - gmtoff = localtime(&now)->tm_gmtoff; + gmtoff = localtime (&now)->tm_gmtoff; #endif return gmtoff; @@ -126,7 +126,7 @@ set_program_name (argv[0]); - gmtoff = gmt_offset(); + gmtoff = gmt_offset (); /* ISO 8601 extended date and time of day representation,