summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2021-09-17 12:48:30 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2021-09-17 12:57:14 -0700
commit066f7729e0174101f0d1c943d9f69886461ab5b8 (patch)
tree0c6879b3b903fe36568f4d7094ec89f87c57db66
parent7958eb97e6ca2aca66c2d5a45b7e803f31646e4e (diff)
downloadtar-066f7729e0174101f0d1c943d9f69886461ab5b8.tar.gz
Pacify gcc -Warray-parameter
* src/common.h (code_timespec): Declare sbuf arg to be an array, to be consistent with definition.
-rw-r--r--src/common.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/common.h b/src/common.h
index 7961f35c..43d06190 100644
--- a/src/common.h
+++ b/src/common.h
@@ -673,10 +673,11 @@ enum { SYSINT_BUFSIZE =
char *sysinttostr (uintmax_t, intmax_t, uintmax_t, char buf[SYSINT_BUFSIZE]);
intmax_t strtosysint (char const *, char **, intmax_t, uintmax_t);
void code_ns_fraction (int ns, char *p);
-char const *code_timespec (struct timespec ts, char *sbuf);
enum { BILLION = 1000000000, LOG10_BILLION = 9 };
enum { TIMESPEC_STRSIZE_BOUND =
UINTMAX_STRSIZE_BOUND + LOG10_BILLION + sizeof "-." - 1 };
+char const *code_timespec (struct timespec ts,
+ char sbuf[TIMESPEC_STRSIZE_BOUND]);
struct timespec decode_timespec (char const *, char **, bool);
/* Return true if T does not represent an out-of-range or invalid value. */