[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
argmatch: fix compilation errors
From: |
Bruno Haible |
Subject: |
argmatch: fix compilation errors |
Date: |
Sun, 30 Jun 2019 21:12:39 +0200 |
User-agent: |
KMail/5.1.3 (Linux/4.4.0-151-generic; KDE/5.18.0; x86_64; ; ) |
Hi Akim,
My weekly continuous-integration test fails. These are the compilation errors:
In file included from test-argmatch.c:22:0:
test-argmatch.c: In function 'argmatch_backup_usage':
../gllib/argmatch.h:284:52: error: 'INT_MAX' undeclared (first use in this
function)
const int screen_width = getenv ("HELP2MAN") ? INT_MAX : 80; \
^
test-argmatch.c:62:1: note: in expansion of macro 'ARGMATCH_DEFINE_GROUP'
ARGMATCH_DEFINE_GROUP(backup, enum backup_type);
^
../gllib/argmatch.h:284:52: note: each undeclared identifier is reported only
once for each function it appears in
const int screen_width = getenv ("HELP2MAN") ? INT_MAX : 80; \
^
test-argmatch.c:62:1: note: in expansion of macro 'ARGMATCH_DEFINE_GROUP'
ARGMATCH_DEFINE_GROUP(backup, enum backup_type);
^
In file included from test-argmatch.c:26:0:
test-argmatch.c: In function 'main':
test-argmatch.c:107:13: error: too few arguments to function
'argmatch_backup_value'
ASSERT (argmatch_backup_value (Input) == Output); \
^
macros.h:57:13: note: in definition of macro 'ASSERT'
if (!(expr)) \
^
test-argmatch.c:119:3: note: in expansion of macro 'CHECK'
CHECK ("klingon", -1);
^
In file included from test-argmatch.c:22:0:
../gllib/argmatch.h:236:3: note: declared here
argmatch_##Name##_value (const char *context, const char *arg) \
^
test-argmatch.c:62:1: note: in expansion of macro 'ARGMATCH_DEFINE_GROUP'
ARGMATCH_DEFINE_GROUP(backup, enum backup_type);
^
In file included from test-argmatch.c:26:0:
test-argmatch.c:111:18: warning: implicit declaration of function
'argmatch_backup_xvalue' [-Wimplicit-function-declaration]
ASSERT (*argmatch_backup_xvalue ("test", Input) == val); \
^
macros.h:57:13: note: in definition of macro 'ASSERT'
if (!(expr)) \
^
test-argmatch.c:119:3: note: in expansion of macro 'CHECK'
CHECK ("klingon", -1);
^
test-argmatch.c:111:17: error: invalid type argument of unary '*' (have 'int')
ASSERT (*argmatch_backup_xvalue ("test", Input) == val); \
^
macros.h:57:13: note: in definition of macro 'ASSERT'
if (!(expr)) \
^
test-argmatch.c:119:3: note: in expansion of macro 'CHECK'
CHECK ("klingon", -1);
^
test-argmatch.c:112:17: error: invalid type argument of unary '*' (have 'int')
ASSERT (*argmatch_backup_xvalue ("test", \
^
macros.h:57:13: note: in definition of macro 'ASSERT'
if (!(expr)) \
^
test-argmatch.c:119:3: note: in expansion of macro 'CHECK'
CHECK ("klingon", -1);
^
test-argmatch.c:107:13: error: too few arguments to function
'argmatch_backup_value'
ASSERT (argmatch_backup_value (Input) == Output); \
^
macros.h:57:13: note: in definition of macro 'ASSERT'
if (!(expr)) \
^
test-argmatch.c:122:3: note: in expansion of macro 'CHECK'
CHECK ("none", 1);
^
In file included from test-argmatch.c:22:0:
../gllib/argmatch.h:236:3: note: declared here
argmatch_##Name##_value (const char *context, const char *arg) \
^
test-argmatch.c:62:1: note: in expansion of macro 'ARGMATCH_DEFINE_GROUP'
ARGMATCH_DEFINE_GROUP(backup, enum backup_type);
^
In file included from test-argmatch.c:26:0:
test-argmatch.c:111:17: error: invalid type argument of unary '*' (have 'int')
ASSERT (*argmatch_backup_xvalue ("test", Input) == val); \
^
macros.h:57:13: note: in definition of macro 'ASSERT'
if (!(expr)) \
^
test-argmatch.c:122:3: note: in expansion of macro 'CHECK'
CHECK ("none", 1);
^
test-argmatch.c:112:17: error: invalid type argument of unary '*' (have 'int')
ASSERT (*argmatch_backup_xvalue ("test", \
^
macros.h:57:13: note: in definition of macro 'ASSERT'
if (!(expr)) \
^
test-argmatch.c:122:3: note: in expansion of macro 'CHECK'
CHECK ("none", 1);
^
test-argmatch.c:107:13: error: too few arguments to function
'argmatch_backup_value'
ASSERT (argmatch_backup_value (Input) == Output); \
^
macros.h:57:13: note: in definition of macro 'ASSERT'
if (!(expr)) \
^
test-argmatch.c:123:3: note: in expansion of macro 'CHECK'
CHECK ("nil", 7);
^
In file included from test-argmatch.c:22:0:
../gllib/argmatch.h:236:3: note: declared here
argmatch_##Name##_value (const char *context, const char *arg) \
^
test-argmatch.c:62:1: note: in expansion of macro 'ARGMATCH_DEFINE_GROUP'
ARGMATCH_DEFINE_GROUP(backup, enum backup_type);
^
In file included from test-argmatch.c:26:0:
test-argmatch.c:111:17: error: invalid type argument of unary '*' (have 'int')
ASSERT (*argmatch_backup_xvalue ("test", Input) == val); \
^
macros.h:57:13: note: in definition of macro 'ASSERT'
if (!(expr)) \
^
test-argmatch.c:123:3: note: in expansion of macro 'CHECK'
CHECK ("nil", 7);
^
test-argmatch.c:112:17: error: invalid type argument of unary '*' (have 'int')
ASSERT (*argmatch_backup_xvalue ("test", \
^
macros.h:57:13: note: in definition of macro 'ASSERT'
if (!(expr)) \
^
test-argmatch.c:123:3: note: in expansion of macro 'CHECK'
CHECK ("nil", 7);
^
test-argmatch.c:107:13: error: too few arguments to function
'argmatch_backup_value'
ASSERT (argmatch_backup_value (Input) == Output); \
^
macros.h:57:13: note: in definition of macro 'ASSERT'
if (!(expr)) \
^
test-argmatch.c:126:3: note: in expansion of macro 'CHECK'
CHECK ("nilpotent", -1);
^
In file included from test-argmatch.c:22:0:
../gllib/argmatch.h:236:3: note: declared here
argmatch_##Name##_value (const char *context, const char *arg) \
^
test-argmatch.c:62:1: note: in expansion of macro 'ARGMATCH_DEFINE_GROUP'
ARGMATCH_DEFINE_GROUP(backup, enum backup_type);
^
In file included from test-argmatch.c:26:0:
test-argmatch.c:111:17: error: invalid type argument of unary '*' (have 'int')
ASSERT (*argmatch_backup_xvalue ("test", Input) == val); \
^
macros.h:57:13: note: in definition of macro 'ASSERT'
if (!(expr)) \
^
test-argmatch.c:126:3: note: in expansion of macro 'CHECK'
CHECK ("nilpotent", -1);
^
test-argmatch.c:112:17: error: invalid type argument of unary '*' (have 'int')
ASSERT (*argmatch_backup_xvalue ("test", \
^
macros.h:57:13: note: in definition of macro 'ASSERT'
if (!(expr)) \
^
test-argmatch.c:126:3: note: in expansion of macro 'CHECK'
CHECK ("nilpotent", -1);
^
test-argmatch.c:107:13: error: too few arguments to function
'argmatch_backup_value'
ASSERT (argmatch_backup_value (Input) == Output); \
^
macros.h:57:13: note: in definition of macro 'ASSERT'
if (!(expr)) \
^
test-argmatch.c:129:3: note: in expansion of macro 'CHECK'
CHECK ("simpl", 3);
^
In file included from test-argmatch.c:22:0:
../gllib/argmatch.h:236:3: note: declared here
argmatch_##Name##_value (const char *context, const char *arg) \
^
test-argmatch.c:62:1: note: in expansion of macro 'ARGMATCH_DEFINE_GROUP'
ARGMATCH_DEFINE_GROUP(backup, enum backup_type);
^
In file included from test-argmatch.c:26:0:
test-argmatch.c:111:17: error: invalid type argument of unary '*' (have 'int')
ASSERT (*argmatch_backup_xvalue ("test", Input) == val); \
^
macros.h:57:13: note: in definition of macro 'ASSERT'
if (!(expr)) \
^
test-argmatch.c:129:3: note: in expansion of macro 'CHECK'
CHECK ("simpl", 3);
^
test-argmatch.c:112:17: error: invalid type argument of unary '*' (have 'int')
ASSERT (*argmatch_backup_xvalue ("test", \
^
macros.h:57:13: note: in definition of macro 'ASSERT'
if (!(expr)) \
^
test-argmatch.c:129:3: note: in expansion of macro 'CHECK'
CHECK ("simpl", 3);
^
test-argmatch.c:107:13: error: too few arguments to function
'argmatch_backup_value'
ASSERT (argmatch_backup_value (Input) == Output); \
^
macros.h:57:13: note: in definition of macro 'ASSERT'
if (!(expr)) \
^
test-argmatch.c:130:3: note: in expansion of macro 'CHECK'
CHECK ("simp", 3);
^
In file included from test-argmatch.c:22:0:
../gllib/argmatch.h:236:3: note: declared here
argmatch_##Name##_value (const char *context, const char *arg) \
^
test-argmatch.c:62:1: note: in expansion of macro 'ARGMATCH_DEFINE_GROUP'
ARGMATCH_DEFINE_GROUP(backup, enum backup_type);
^
In file included from test-argmatch.c:26:0:
test-argmatch.c:111:17: error: invalid type argument of unary '*' (have 'int')
ASSERT (*argmatch_backup_xvalue ("test", Input) == val); \
^
macros.h:57:13: note: in definition of macro 'ASSERT'
if (!(expr)) \
^
test-argmatch.c:130:3: note: in expansion of macro 'CHECK'
CHECK ("simp", 3);
^
test-argmatch.c:112:17: error: invalid type argument of unary '*' (have 'int')
ASSERT (*argmatch_backup_xvalue ("test", \
^
macros.h:57:13: note: in definition of macro 'ASSERT'
if (!(expr)) \
^
test-argmatch.c:130:3: note: in expansion of macro 'CHECK'
CHECK ("simp", 3);
^
test-argmatch.c:107:13: error: too few arguments to function
'argmatch_backup_value'
ASSERT (argmatch_backup_value (Input) == Output); \
^
macros.h:57:13: note: in definition of macro 'ASSERT'
if (!(expr)) \
^
test-argmatch.c:131:3: note: in expansion of macro 'CHECK'
CHECK ("sim", 3);
^
In file included from test-argmatch.c:22:0:
../gllib/argmatch.h:236:3: note: declared here
argmatch_##Name##_value (const char *context, const char *arg) \
^
test-argmatch.c:62:1: note: in expansion of macro 'ARGMATCH_DEFINE_GROUP'
ARGMATCH_DEFINE_GROUP(backup, enum backup_type);
^
In file included from test-argmatch.c:26:0:
test-argmatch.c:111:17: error: invalid type argument of unary '*' (have 'int')
ASSERT (*argmatch_backup_xvalue ("test", Input) == val); \
^
macros.h:57:13: note: in definition of macro 'ASSERT'
if (!(expr)) \
^
test-argmatch.c:131:3: note: in expansion of macro 'CHECK'
CHECK ("sim", 3);
^
test-argmatch.c:112:17: error: invalid type argument of unary '*' (have 'int')
ASSERT (*argmatch_backup_xvalue ("test", \
^
macros.h:57:13: note: in definition of macro 'ASSERT'
if (!(expr)) \
^
test-argmatch.c:131:3: note: in expansion of macro 'CHECK'
CHECK ("sim", 3);
^
test-argmatch.c:107:13: error: too few arguments to function
'argmatch_backup_value'
ASSERT (argmatch_backup_value (Input) == Output); \
^
macros.h:57:13: note: in definition of macro 'ASSERT'
if (!(expr)) \
^
test-argmatch.c:134:3: note: in expansion of macro 'CHECK'
CHECK ("numbered", 9);
^
In file included from test-argmatch.c:22:0:
../gllib/argmatch.h:236:3: note: declared here
argmatch_##Name##_value (const char *context, const char *arg) \
^
test-argmatch.c:62:1: note: in expansion of macro 'ARGMATCH_DEFINE_GROUP'
ARGMATCH_DEFINE_GROUP(backup, enum backup_type);
^
In file included from test-argmatch.c:26:0:
test-argmatch.c:111:17: error: invalid type argument of unary '*' (have 'int')
ASSERT (*argmatch_backup_xvalue ("test", Input) == val); \
^
macros.h:57:13: note: in definition of macro 'ASSERT'
if (!(expr)) \
^
test-argmatch.c:134:3: note: in expansion of macro 'CHECK'
CHECK ("numbered", 9);
^
test-argmatch.c:112:17: error: invalid type argument of unary '*' (have 'int')
ASSERT (*argmatch_backup_xvalue ("test", \
^
macros.h:57:13: note: in definition of macro 'ASSERT'
if (!(expr)) \
^
test-argmatch.c:134:3: note: in expansion of macro 'CHECK'
CHECK ("numbered", 9);
^
test-argmatch.c:107:13: error: too few arguments to function
'argmatch_backup_value'
ASSERT (argmatch_backup_value (Input) == Output); \
^
macros.h:57:13: note: in definition of macro 'ASSERT'
if (!(expr)) \
^
test-argmatch.c:135:3: note: in expansion of macro 'CHECK'
CHECK ("numbere", -2);
^
In file included from test-argmatch.c:22:0:
../gllib/argmatch.h:236:3: note: declared here
argmatch_##Name##_value (const char *context, const char *arg) \
^
test-argmatch.c:62:1: note: in expansion of macro 'ARGMATCH_DEFINE_GROUP'
ARGMATCH_DEFINE_GROUP(backup, enum backup_type);
^
In file included from test-argmatch.c:26:0:
test-argmatch.c:111:17: error: invalid type argument of unary '*' (have 'int')
ASSERT (*argmatch_backup_xvalue ("test", Input) == val); \
^
macros.h:57:13: note: in definition of macro 'ASSERT'
if (!(expr)) \
^
test-argmatch.c:135:3: note: in expansion of macro 'CHECK'
CHECK ("numbere", -2);
^
test-argmatch.c:112:17: error: invalid type argument of unary '*' (have 'int')
ASSERT (*argmatch_backup_xvalue ("test", \
^
macros.h:57:13: note: in definition of macro 'ASSERT'
if (!(expr)) \
^
test-argmatch.c:135:3: note: in expansion of macro 'CHECK'
CHECK ("numbere", -2);
^
test-argmatch.c:107:13: error: too few arguments to function
'argmatch_backup_value'
ASSERT (argmatch_backup_value (Input) == Output); \
^
macros.h:57:13: note: in definition of macro 'ASSERT'
if (!(expr)) \
^
test-argmatch.c:136:3: note: in expansion of macro 'CHECK'
CHECK ("number", -2);
^
In file included from test-argmatch.c:22:0:
../gllib/argmatch.h:236:3: note: declared here
argmatch_##Name##_value (const char *context, const char *arg) \
^
test-argmatch.c:62:1: note: in expansion of macro 'ARGMATCH_DEFINE_GROUP'
ARGMATCH_DEFINE_GROUP(backup, enum backup_type);
^
In file included from test-argmatch.c:26:0:
test-argmatch.c:111:17: error: invalid type argument of unary '*' (have 'int')
ASSERT (*argmatch_backup_xvalue ("test", Input) == val); \
^
macros.h:57:13: note: in definition of macro 'ASSERT'
if (!(expr)) \
^
test-argmatch.c:136:3: note: in expansion of macro 'CHECK'
CHECK ("number", -2);
^
test-argmatch.c:112:17: error: invalid type argument of unary '*' (have 'int')
ASSERT (*argmatch_backup_xvalue ("test", \
^
macros.h:57:13: note: in definition of macro 'ASSERT'
if (!(expr)) \
^
test-argmatch.c:136:3: note: in expansion of macro 'CHECK'
CHECK ("number", -2);
^
test-argmatch.c:107:13: error: too few arguments to function
'argmatch_backup_value'
ASSERT (argmatch_backup_value (Input) == Output); \
^
macros.h:57:13: note: in definition of macro 'ASSERT'
if (!(expr)) \
^
test-argmatch.c:137:3: note: in expansion of macro 'CHECK'
CHECK ("numbe", -2);
^
In file included from test-argmatch.c:22:0:
../gllib/argmatch.h:236:3: note: declared here
argmatch_##Name##_value (const char *context, const char *arg) \
^
test-argmatch.c:62:1: note: in expansion of macro 'ARGMATCH_DEFINE_GROUP'
ARGMATCH_DEFINE_GROUP(backup, enum backup_type);
^
In file included from test-argmatch.c:26:0:
test-argmatch.c:111:17: error: invalid type argument of unary '*' (have 'int')
ASSERT (*argmatch_backup_xvalue ("test", Input) == val); \
^
macros.h:57:13: note: in definition of macro 'ASSERT'
if (!(expr)) \
^
test-argmatch.c:137:3: note: in expansion of macro 'CHECK'
CHECK ("numbe", -2);
^
test-argmatch.c:112:17: error: invalid type argument of unary '*' (have 'int')
ASSERT (*argmatch_backup_xvalue ("test", \
^
macros.h:57:13: note: in definition of macro 'ASSERT'
if (!(expr)) \
^
test-argmatch.c:137:3: note: in expansion of macro 'CHECK'
CHECK ("numbe", -2);
^
test-argmatch.c:107:13: error: too few arguments to function
'argmatch_backup_value'
ASSERT (argmatch_backup_value (Input) == Output); \
^
macros.h:57:13: note: in definition of macro 'ASSERT'
if (!(expr)) \
^
test-argmatch.c:138:3: note: in expansion of macro 'CHECK'
CHECK ("numb", -2);
^
In file included from test-argmatch.c:22:0:
../gllib/argmatch.h:236:3: note: declared here
argmatch_##Name##_value (const char *context, const char *arg) \
^
test-argmatch.c:62:1: note: in expansion of macro 'ARGMATCH_DEFINE_GROUP'
ARGMATCH_DEFINE_GROUP(backup, enum backup_type);
^
In file included from test-argmatch.c:26:0:
test-argmatch.c:111:17: error: invalid type argument of unary '*' (have 'int')
ASSERT (*argmatch_backup_xvalue ("test", Input) == val); \
^
macros.h:57:13: note: in definition of macro 'ASSERT'
if (!(expr)) \
^
test-argmatch.c:138:3: note: in expansion of macro 'CHECK'
CHECK ("numb", -2);
^
test-argmatch.c:112:17: error: invalid type argument of unary '*' (have 'int')
ASSERT (*argmatch_backup_xvalue ("test", \
^
macros.h:57:13: note: in definition of macro 'ASSERT'
if (!(expr)) \
^
test-argmatch.c:138:3: note: in expansion of macro 'CHECK'
CHECK ("numb", -2);
^
test-argmatch.c:107:13: error: too few arguments to function
'argmatch_backup_value'
ASSERT (argmatch_backup_value (Input) == Output); \
^
macros.h:57:13: note: in definition of macro 'ASSERT'
if (!(expr)) \
^
test-argmatch.c:139:3: note: in expansion of macro 'CHECK'
CHECK ("num", -2);
^
In file included from test-argmatch.c:22:0:
../gllib/argmatch.h:236:3: note: declared here
argmatch_##Name##_value (const char *context, const char *arg) \
^
test-argmatch.c:62:1: note: in expansion of macro 'ARGMATCH_DEFINE_GROUP'
ARGMATCH_DEFINE_GROUP(backup, enum backup_type);
^
In file included from test-argmatch.c:26:0:
test-argmatch.c:111:17: error: invalid type argument of unary '*' (have 'int')
ASSERT (*argmatch_backup_xvalue ("test", Input) == val); \
^
macros.h:57:13: note: in definition of macro 'ASSERT'
if (!(expr)) \
^
test-argmatch.c:139:3: note: in expansion of macro 'CHECK'
CHECK ("num", -2);
^
test-argmatch.c:112:17: error: invalid type argument of unary '*' (have 'int')
ASSERT (*argmatch_backup_xvalue ("test", \
^
macros.h:57:13: note: in definition of macro 'ASSERT'
if (!(expr)) \
^
test-argmatch.c:139:3: note: in expansion of macro 'CHECK'
CHECK ("num", -2);
^
test-argmatch.c:107:13: error: too few arguments to function
'argmatch_backup_value'
ASSERT (argmatch_backup_value (Input) == Output); \
^
macros.h:57:13: note: in definition of macro 'ASSERT'
if (!(expr)) \
^
test-argmatch.c:140:3: note: in expansion of macro 'CHECK'
CHECK ("nu", -2);
^
In file included from test-argmatch.c:22:0:
../gllib/argmatch.h:236:3: note: declared here
argmatch_##Name##_value (const char *context, const char *arg) \
^
test-argmatch.c:62:1: note: in expansion of macro 'ARGMATCH_DEFINE_GROUP'
ARGMATCH_DEFINE_GROUP(backup, enum backup_type);
^
In file included from test-argmatch.c:26:0:
test-argmatch.c:111:17: error: invalid type argument of unary '*' (have 'int')
ASSERT (*argmatch_backup_xvalue ("test", Input) == val); \
^
macros.h:57:13: note: in definition of macro 'ASSERT'
if (!(expr)) \
^
test-argmatch.c:140:3: note: in expansion of macro 'CHECK'
CHECK ("nu", -2);
^
test-argmatch.c:112:17: error: invalid type argument of unary '*' (have 'int')
ASSERT (*argmatch_backup_xvalue ("test", \
^
macros.h:57:13: note: in definition of macro 'ASSERT'
if (!(expr)) \
^
test-argmatch.c:140:3: note: in expansion of macro 'CHECK'
CHECK ("nu", -2);
^
test-argmatch.c:107:13: error: too few arguments to function
'argmatch_backup_value'
ASSERT (argmatch_backup_value (Input) == Output); \
^
macros.h:57:13: note: in definition of macro 'ASSERT'
if (!(expr)) \
^
test-argmatch.c:141:3: note: in expansion of macro 'CHECK'
CHECK ("n", -2);
^
In file included from test-argmatch.c:22:0:
../gllib/argmatch.h:236:3: note: declared here
argmatch_##Name##_value (const char *context, const char *arg) \
^
test-argmatch.c:62:1: note: in expansion of macro 'ARGMATCH_DEFINE_GROUP'
ARGMATCH_DEFINE_GROUP(backup, enum backup_type);
^
In file included from test-argmatch.c:26:0:
test-argmatch.c:111:17: error: invalid type argument of unary '*' (have 'int')
ASSERT (*argmatch_backup_xvalue ("test", Input) == val); \
^
macros.h:57:13: note: in definition of macro 'ASSERT'
if (!(expr)) \
^
test-argmatch.c:141:3: note: in expansion of macro 'CHECK'
CHECK ("n", -2);
^
test-argmatch.c:112:17: error: invalid type argument of unary '*' (have 'int')
ASSERT (*argmatch_backup_xvalue ("test", \
^
macros.h:57:13: note: in definition of macro 'ASSERT'
if (!(expr)) \
^
test-argmatch.c:141:3: note: in expansion of macro 'CHECK'
CHECK ("n", -2);
^
test-argmatch.c:107:13: error: too few arguments to function
'argmatch_backup_value'
ASSERT (argmatch_backup_value (Input) == Output); \
^
macros.h:57:13: note: in definition of macro 'ASSERT'
if (!(expr)) \
^
test-argmatch.c:144:3: note: in expansion of macro 'CHECK'
CHECK ("ne", -2);
^
In file included from test-argmatch.c:22:0:
../gllib/argmatch.h:236:3: note: declared here
argmatch_##Name##_value (const char *context, const char *arg) \
^
test-argmatch.c:62:1: note: in expansion of macro 'ARGMATCH_DEFINE_GROUP'
ARGMATCH_DEFINE_GROUP(backup, enum backup_type);
^
In file included from test-argmatch.c:26:0:
test-argmatch.c:111:17: error: invalid type argument of unary '*' (have 'int')
ASSERT (*argmatch_backup_xvalue ("test", Input) == val); \
^
macros.h:57:13: note: in definition of macro 'ASSERT'
if (!(expr)) \
^
test-argmatch.c:144:3: note: in expansion of macro 'CHECK'
CHECK ("ne", -2);
^
test-argmatch.c:112:17: error: invalid type argument of unary '*' (have 'int')
ASSERT (*argmatch_backup_xvalue ("test", \
^
macros.h:57:13: note: in definition of macro 'ASSERT'
if (!(expr)) \
^
test-argmatch.c:144:3: note: in expansion of macro 'CHECK'
CHECK ("ne", -2);
^
test-argmatch.c:107:13: error: too few arguments to function
'argmatch_backup_value'
ASSERT (argmatch_backup_value (Input) == Output); \
^
macros.h:57:13: note: in definition of macro 'ASSERT'
if (!(expr)) \
^
test-argmatch.c:147:3: note: in expansion of macro 'CHECK'
CHECK ("si", 3);
^
In file included from test-argmatch.c:22:0:
../gllib/argmatch.h:236:3: note: declared here
argmatch_##Name##_value (const char *context, const char *arg) \
^
test-argmatch.c:62:1: note: in expansion of macro 'ARGMATCH_DEFINE_GROUP'
ARGMATCH_DEFINE_GROUP(backup, enum backup_type);
^
In file included from test-argmatch.c:26:0:
test-argmatch.c:111:17: error: invalid type argument of unary '*' (have 'int')
ASSERT (*argmatch_backup_xvalue ("test", Input) == val); \
^
macros.h:57:13: note: in definition of macro 'ASSERT'
if (!(expr)) \
^
test-argmatch.c:147:3: note: in expansion of macro 'CHECK'
CHECK ("si", 3);
^
test-argmatch.c:112:17: error: invalid type argument of unary '*' (have 'int')
ASSERT (*argmatch_backup_xvalue ("test", \
^
macros.h:57:13: note: in definition of macro 'ASSERT'
if (!(expr)) \
^
test-argmatch.c:147:3: note: in expansion of macro 'CHECK'
CHECK ("si", 3);
^
test-argmatch.c:107:13: error: too few arguments to function
'argmatch_backup_value'
ASSERT (argmatch_backup_value (Input) == Output); \
^
macros.h:57:13: note: in definition of macro 'ASSERT'
if (!(expr)) \
^
test-argmatch.c:148:3: note: in expansion of macro 'CHECK'
CHECK ("s", 3);
^
In file included from test-argmatch.c:22:0:
../gllib/argmatch.h:236:3: note: declared here
argmatch_##Name##_value (const char *context, const char *arg) \
^
test-argmatch.c:62:1: note: in expansion of macro 'ARGMATCH_DEFINE_GROUP'
ARGMATCH_DEFINE_GROUP(backup, enum backup_type);
^
In file included from test-argmatch.c:26:0:
test-argmatch.c:111:17: error: invalid type argument of unary '*' (have 'int')
ASSERT (*argmatch_backup_xvalue ("test", Input) == val); \
^
macros.h:57:13: note: in definition of macro 'ASSERT'
if (!(expr)) \
^
test-argmatch.c:148:3: note: in expansion of macro 'CHECK'
CHECK ("s", 3);
^
test-argmatch.c:112:17: error: invalid type argument of unary '*' (have 'int')
ASSERT (*argmatch_backup_xvalue ("test", \
^
macros.h:57:13: note: in definition of macro 'ASSERT'
if (!(expr)) \
^
test-argmatch.c:148:3: note: in expansion of macro 'CHECK'
CHECK ("s", 3);
^
Makefile:19953: recipe for target 'test-argmatch.o' failed
make[4]: *** [test-argmatch.o] Error 1
And indeed I get these errors also through a simple command:
$ ./gnulib-tool --test argmatch
This patch fixes it. Assuming it's uncontroversial, I'm pushing it:
2019-06-30 Bruno Haible <address@hidden>
argmatch: Fix compilation errors.
* lib/argmatch.h: Include <limits.h>, for INT_MAX.
* tests/test-argmatch.c (main): Update after last-minute function names
change.
diff --git a/lib/argmatch.h b/lib/argmatch.h
index 46a452c..d185499 100644
--- a/lib/argmatch.h
+++ b/lib/argmatch.h
@@ -22,6 +22,7 @@
#ifndef ARGMATCH_H_
# define ARGMATCH_H_ 1
+# include <limits.h>
# include <stdbool.h>
# include <stddef.h>
# include <stdio.h>
diff --git a/tests/test-argmatch.c b/tests/test-argmatch.c
index 0d19e97..11b5819 100644
--- a/tests/test-argmatch.c
+++ b/tests/test-argmatch.c
@@ -104,13 +104,13 @@ main (int argc, char *argv[])
#define CHECK(Input, Output) \
do { \
ASSERT (ARGMATCH (Input, backup_args, backup_vals) == Output); \
- ASSERT (argmatch_backup_value (Input) == Output); \
+ ASSERT (argmatch_backup_choice (Input) == Output); \
if (0 <= Output) \
{ \
enum backup_type val = argmatch_backup_args[Output].val; \
- ASSERT (*argmatch_backup_xvalue ("test", Input) == val); \
- ASSERT (*argmatch_backup_xvalue ("test", \
- argmatch_backup_argument (&val)) \
+ ASSERT (*argmatch_backup_value ("test", Input) == val); \
+ ASSERT (*argmatch_backup_value ("test", \
+ argmatch_backup_argument (&val)) \
== val); \
} \
} while (0)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- argmatch: fix compilation errors,
Bruno Haible <=