]> git.ipfire.org Git - thirdparty/tar.git/commitdiff
Pacify gcc -Warray-parameter
authorPaul Eggert <eggert@cs.ucla.edu>
Fri, 17 Sep 2021 19:48:30 +0000 (12:48 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Fri, 17 Sep 2021 19:57:14 +0000 (12:57 -0700)
* src/common.h (code_timespec): Declare sbuf arg to be an array,
to be consistent with definition.

src/common.h

index 7961f35ca634ccc4f6f9274fa437b28985e7666d..43d0619052b6296c4b2e43b226bccf0dcaf50855 100644 (file)
@@ -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.  */