]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
(struct dummy): Ensure that at least the number of
authorJim Meyering <jim@meyering.net>
Mon, 5 May 2003 07:54:19 +0000 (07:54 +0000)
committerJim Meyering <jim@meyering.net>
Mon, 5 May 2003 07:54:19 +0000 (07:54 +0000)
initializers matches the number of members in the corresponding enum.

lib/ftw.c

index 814280cecca5cd49795fee7dc385f3f1eb9f8f9f..488f72afac6f583b65c95baba5f9330ed4dfcbb1 100644 (file)
--- 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)