From fa612dd1fd07cec782988723067907fbd1110974 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Mon, 24 Aug 2020 13:32:59 -0400 Subject: [PATCH] Appease GCC sprintf warnings found on Fedora 32/GCC 10.0.1 Increase the size of DDT_NAMELEN and MNT_LINE_MAX to appease GCC snprintf truncation warnings. Reviewed-by: Brian Behlendorf Signed-off-by: Chris McDonough Closes #10712 Closes #10766 --- include/sys/ddt.h | 2 +- lib/libspl/include/sys/mnttab.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/sys/ddt.h b/include/sys/ddt.h index bb7931636b..68b8c453a5 100644 --- a/include/sys/ddt.h +++ b/include/sys/ddt.h @@ -175,7 +175,7 @@ typedef struct ddt_ops { int (*ddt_op_count)(objset_t *os, uint64_t object, uint64_t *count); } ddt_ops_t; -#define DDT_NAMELEN 102 +#define DDT_NAMELEN 107 extern void ddt_object_name(ddt_t *ddt, enum ddt_type type, enum ddt_class class, char *name); diff --git a/lib/libspl/include/sys/mnttab.h b/lib/libspl/include/sys/mnttab.h index 026a8fa7be..dd9eb9b169 100644 --- a/lib/libspl/include/sys/mnttab.h +++ b/lib/libspl/include/sys/mnttab.h @@ -39,7 +39,7 @@ #endif /* MNTTAB */ #define MNTTAB "/proc/self/mounts" -#define MNT_LINE_MAX 4096 +#define MNT_LINE_MAX 4108 #define MNT_TOOLONG 1 /* entry exceeds MNT_LINE_MAX */ #define MNT_TOOMANY 2 /* too many fields in line */