summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2003-05-05 07:54:19 +0000
committerJim Meyering <jim@meyering.net>2003-05-05 07:54:19 +0000
commita8916294ec9711f125555f316d87e7a7b126e6b5 (patch)
treeb040bf1916e24e7b34469b40d2a86d6bf6a71dd9
parent95623ba86e60202ddcbd93df887f3d5f7d5c257c (diff)
downloadcoreutils-a8916294ec9711f125555f316d87e7a7b126e6b5.tar.xz
(struct dummy): Ensure that at least the number of
initializers matches the number of members in the corresponding enum.
-rw-r--r--lib/ftw.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/ftw.c b/lib/ftw.c
index 814280cec..488f72afa 100644
--- a/lib/ftw.c
+++ b/lib/ftw.c
@@ -237,6 +237,14 @@ static const int ftw_arr[] =
FTW_F, FTW_D, FTW_DNR, FTW_NS, FTW_DCH, FTW_DCHP, FTW_DPRE, FTW_F, FTW_D, FTW_NS
};
+/* Ensure that each of the above arrays has the number of
+ initializers corresponding to enum Ftw_option. */
+struct dummy
+{
+ int p1 [sizeof nftw_arr / sizeof nftw_arr[0] == FTW_N_MEMBERS ? 1 : -1];
+ int p2 [sizeof nftw_arr / sizeof ftw_arr[0] == FTW_N_MEMBERS ? 1 : -1];
+};
+
/* Forward declarations of local functions. */
static int ftw_dir (struct ftw_data *data, struct FTW_STAT *st)