From c216b3534b0a419b8fcad55e0c94dca2c7705d0c Mon Sep 17 00:00:00 2001 From: mrdudz Date: Wed, 26 Aug 2020 13:36:43 +0200 Subject: [PATCH] fix compilation, fixes issue #1184 --- testcode/lib/scanf-test.c | 29 ++++++++++++++--------------- 1 file changed, 14 insertions(+), 15 deletions(-) diff --git a/testcode/lib/scanf-test.c b/testcode/lib/scanf-test.c index 9fce01b77..f17b62294 100644 --- a/testcode/lib/scanf-test.c +++ b/testcode/lib/scanf-test.c @@ -14,9 +14,7 @@ /* Define USE_STDIO, when you want to use the stdio functions. ** Do not define it, when you want to use the conio functions. */ -/* #define USE_STDIO -*/ #include #include @@ -35,22 +33,23 @@ #define ARRAYSIZE(a) (sizeof (a) / sizeof (a)[0]) +typedef enum { + INT, + CHAR +} TYPE; + +typedef union { + int nvalue; + const char *svalue; +} VALUE; + static const struct { const char *input, *format; int rvalue; - enum TYPE { - INT, - CHAR - } type1; - union { - int nvalue; - const char *svalue; - } v1; - enum TYPE type2; - union { - int nvalue; - const char *svalue; - } v2; + TYPE type1; + VALUE v1; + TYPE type2; + VALUE v2; } test_data[] = { /* Input sequences for character specifiers must be less than 80 characters ** long. These format strings are allowwed a maximum of two assignment