Skip to content

Commit 315a500

Browse files
committed
Merge pull request #145 from adbridge/armcc
Fix ARMCC compiler warning: Missing arg type.
2 parents aa3c0de + 5e58036 commit 315a500

File tree

2 files changed

+13
-6
lines changed

2 files changed

+13
-6
lines changed

frameworks/utest/source/unity_handler.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,17 +18,16 @@
1818

1919
#include "utest/harness.h"
2020
#include "utest/stack_trace.h"
21+
#include "utest/unity_handler.h"
2122

2223

23-
extern "C"
24-
void utest_unity_assert_failure()
24+
void utest_unity_assert_failure(void)
2525
{
2626
UTEST_LOG_FUNCTION();
2727
utest::v1::Harness::raise_failure(utest::v1::REASON_ASSERTION);
2828
}
2929

30-
extern "C"
31-
void utest_unity_ignore_failure()
30+
void utest_unity_ignore_failure(void)
3231
{
3332
UTEST_LOG_FUNCTION();
3433
utest::v1::Harness::raise_failure(utest::v1::failure_reason_t(utest::v1::REASON_ASSERTION | utest::v1::REASON_IGNORE));

frameworks/utest/utest/unity_handler.h

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,18 @@
2121

2222
#include <stdint.h>
2323

24+
#ifdef __cplusplus
25+
extern "C" {
26+
#endif
27+
2428
/// this function is called from the unity module when an assertion failed.
25-
void utest_unity_assert_failure();
29+
void utest_unity_assert_failure(void);
2630

2731
/// this function is called from the unity module when an assertion failed, but is ignored.
28-
void utest_unity_ignore_failure();
32+
void utest_unity_ignore_failure(void);
33+
34+
#ifdef __cplusplus
35+
}
36+
#endif
2937

3038
#endif // UTEST_UNITY_ASSERT_FAILURE_H

0 commit comments

Comments
 (0)