Show the right type when warning about excessive initializer elements.
authorChristoph Mallon <christoph.mallon@gmx.de>
Thu, 5 Jul 2012 06:33:29 +0000 (08:33 +0200)
committerChristoph Mallon <christoph.mallon@gmx.de>
Thu, 5 Jul 2012 06:33:29 +0000 (08:33 +0200)
parser.c

index 53f8fa2..5afa7fa 100644 (file)
--- a/parser.c
+++ b/parser.c
@@ -2061,7 +2061,7 @@ finish_designator:
                                if (sub != NULL) {
                                        next_if(',');
                                        if (token.kind != '}') {
-                                               warningf(WARN_OTHER, HERE, "excessive elements in initializer for type '%T'", orig_type);
+                                               warningf(WARN_OTHER, HERE, "excessive elements in initializer for type '%T'", outer_type);
                                        }
                                        /* TODO: eat , ... */
                                        return sub;