]> granicus.if.org Git - check/commitdiff
Fix invalid prototype for tcase_name(void)
authorChris Leishman <chris@leishman.org>
Sat, 26 Aug 2017 05:26:56 +0000 (22:26 -0700)
committerChris Leishman <chris@leishman.org>
Sat, 26 Aug 2017 05:31:01 +0000 (22:31 -0700)
The existing prototype in check.h is `const char* tcase_name()`. This
causes issues on platforms that use strict prototype checking, e.g. the
latest clang compiler with -Wstrict-prototypes ('this function
declaration is not a prototype [-Werror,-Wstrict-prototypes]').

src/check.c
src/check.h.in

index 7e4427ce1de57ebb507fdbc076929db2b1ed3c90..e42636ed3d402458b8dec1a6b85f815c70307e94 100644 (file)
@@ -349,7 +349,7 @@ void tcase_fn_start(const char *fname, const char *file,
     current_test_name = fname;
 }
 
-const char* tcase_name()
+const char* tcase_name(void)
 {
        return current_test_name;
 }
index 877114663a81bb7db809ce3fc142af87430a56b2..76f09b0f2ff14fe248afb2a355c15943461279e6 100644 (file)
@@ -390,7 +390,7 @@ CK_DLL_EXP void CK_EXPORT tcase_fn_start(const char *fname, const char *file,
  *
  * @since 0.11.0
  */
-CK_DLL_EXP const char* CK_EXPORT tcase_name();
+CK_DLL_EXP const char* CK_EXPORT tcase_name(void);
 
 /**
  * Start a unit test with START_TEST(unit_name), end with END_TEST.