diff options
author | Mike Frysinger <vapier@gentoo.org> | 2016-07-22 00:07:00 +0530 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2016-07-22 00:07:00 +0530 |
commit | 4cd4a9b4c457259596669e8a3a279e02799baff5 (patch) | |
tree | c459578ee0c0722000d5210681b32357de7c25df /tests | |
parent | 68806ff03ea5fe91903b654938df1bf450f7b147 (diff) | |
download | libgd-4cd4a9b4c457259596669e8a3a279e02799baff5.tar.gz |
tests: fix gdTestAssertMsg handling of messages w/out format flags
If the message doesn't contain any format flags (e.g. %s), don't force
the caller to pass in a dummy arg to make the compiler happy.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/gdimagefile/gdnametest.c | 4 | ||||
-rw-r--r-- | tests/gdtest/gdtest.h | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/tests/gdimagefile/gdnametest.c b/tests/gdimagefile/gdnametest.c index eef561a..66da484 100644 --- a/tests/gdimagefile/gdnametest.c +++ b/tests/gdimagefile/gdnametest.c @@ -49,8 +49,8 @@ gdImagePtr mkcross() { void do_test() { - gdTestAssertMsg(strchr("123",'2') != 0, "strchr() is not functional.\n",1); - gdTestAssertMsg(strcasecmp("123abC","123Abc") == 0, "strcasecmp() is not functional.\n",1); + gdTestAssertMsg(strchr("123",'2') != 0, "strchr() is not functional.\n"); + gdTestAssertMsg(strcasecmp("123abC","123Abc") == 0, "strcasecmp() is not functional.\n"); int n; struct { diff --git a/tests/gdtest/gdtest.h b/tests/gdtest/gdtest.h index e6cb2c5..eecf5f6 100644 --- a/tests/gdtest/gdtest.h +++ b/tests/gdtest/gdtest.h @@ -70,7 +70,7 @@ int _gdTestErrorMsg(const char* file, unsigned int line, const char* string, ... #define gdTestAssert(cond) _gdTestAssert(__FILE__, __LINE__, (cond)) -#define gdTestAssertMsg(cond, message, ...) _gdTestAssertMsg(__FILE__, __LINE__, (cond),(message),__VA_ARGS__) +#define gdTestAssertMsg(cond, message, ...) _gdTestAssertMsg(__FILE__, __LINE__, (cond), (message), ## __VA_ARGS__) #define gdTestErrorMsg(...) _gdTestErrorMsg(__FILE__, __LINE__, __VA_ARGS__) |