From: Darrick J. Wong Date: Wed, 12 Dec 2018 17:42:40 +0000 (-0600) Subject: xfs_db: add missing string name for DBM_COWDATA X-Git-Tag: v4.20.0-rc1~21 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=9b92d4ba1cd6e7a87e02d5422d57d25e4e4c08c1;p=thirdparty%2Fxfsprogs-dev.git xfs_db: add missing string name for DBM_COWDATA In db/check.c, typename[] is supposed to have strings for every DBM_ type, but we forgot one. Add it now. Signed-off-by: Darrick J. Wong Reviewed-by: Eric Sandeen Signed-off-by: Eric Sandeen --- diff --git a/db/check.c b/db/check.c index 352aab3f6..442600be2 100644 --- a/db/check.c +++ b/db/check.c @@ -164,8 +164,19 @@ static const char *typename[] = { "btrmap", "btrefcnt", "rldata", + "cowdata", NULL }; + +/* + * Make sure typename has the same number of elements as there are DBM types. + * This function isn't called anywhere; we just use it to trip up the compiler. + */ +static inline void check_typename(void) +{ + BUILD_BUG_ON(ARRAY_SIZE(typename) != DBM_NDBM + 1); +} + static int verbose; #define CHECK_BLIST(b) (blist_size && check_blist(b))