Fix the check for overlapping initializers; the current code tries to
skip ones with zero ->bit_size, but doesn't get it right.
Signed-off-by: Al Viro <[EMAIL PROTECTED]>
---
expand.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/expand.c b/expand.c
index aafbfe0..a46f1c2 100644
--- a/expand.c
+++ b/expand.c
@@ -874,7 +874,9 @@ static void verify_nonoverlapping(struct expression_list
**list)
struct expression *b;
FOR_EACH_PTR(*list, b) {
- if (a && a->ctype && a->ctype->bit_size && bit_offset(a) ==
bit_offset(b)) {
+ if (!b->ctype || !b->ctype->bit_size)
+ continue;
+ if (a && bit_offset(a) == bit_offset(b)) {
sparse_error(a->pos, "Initializer entry defined twice");
info(b->pos, " also defined here");
return;
--
1.5.0-rc2.GIT
-
To unsubscribe from this list: send the line "unsubscribe linux-sparse" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html