summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2002-05-22 07:33:43 +0000
committerJim Meyering <jim@meyering.net>2002-05-22 07:33:43 +0000
commiteaa373aeb64ad85ff0f8414bbc4b8484047a6e1c (patch)
treef932285a4e17f3b2d0fa4167d674e13f496e586e
parentcea518eba579b99905a269a740b30c94effe90b2 (diff)
downloadcoreutils-eaa373aeb64ad85ff0f8414bbc4b8484047a6e1c.tar.xz
[struct dummy]: Renamed. Don't rely on portability of
zero-length arrays. Instead, use sizes of -1 or +1.
-rw-r--r--src/od.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/od.c b/src/od.c
index 0cc3b0c93..2e3f7f9f2 100644
--- a/src/od.c
+++ b/src/od.c
@@ -153,10 +153,10 @@ static const int width_bytes[] =
/* Ensure that for each member of `enum size_spec' there is an
initializer in the width_bytes array. */
-struct assert_width_bytes_matches_size_spec_decl
+struct dummy
{
- int t1[sizeof width_bytes / sizeof width_bytes[0] - N_SIZE_SPECS];
- int t2[N_SIZE_SPECS - sizeof width_bytes / sizeof width_bytes[0]];
+ int assert_width_bytes_matches_size_spec_decl
+ [sizeof width_bytes / sizeof width_bytes[0] == N_SIZE_SPECS ? 1 : -1];
};
/* Names for some non-printing characters. */