summaryrefslogtreecommitdiffstatshomepage
path: root/stmhal/main.c
diff options
context:
space:
mode:
authormux <freelancer.c@gmail.com>2014-06-21 17:24:55 +0200
committermux <freelancer.c@gmail.com>2014-06-21 17:24:55 +0200
commit5c8db4854109100790977b4d84296e5eb29ffe9e (patch)
tree3aa383ffbf36d8b789fc10d0059f4c0c29c1b6a4 /stmhal/main.c
parent4c4b9d15ab94dfe31ec34559ab70bafc0ef11f02 (diff)
downloadmicropython-5c8db4854109100790977b4d84296e5eb29ffe9e.tar.gz
micropython-5c8db4854109100790977b4d84296e5eb29ffe9e.zip
Fix asser_func warning/error
* Add while(1) to assert_func to avoid func returns warning * Define a weak attr in mpconfig.h
Diffstat (limited to 'stmhal/main.c')
-rw-r--r--stmhal/main.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/stmhal/main.c b/stmhal/main.c
index e264fdf4b3..b74fa73186 100644
--- a/stmhal/main.c
+++ b/stmhal/main.c
@@ -111,11 +111,11 @@ void nlr_jump_fail(void *val) {
}
#ifndef NDEBUG
-void __attribute__((weak))
- __assert_func(const char *file, int line, const char *func, const char *expr) {
+void MP_WEAK __assert_func(const char *file, int line, const char *func, const char *expr) {
(void)func;
printf("Assertion '%s' failed, at file %s:%d\n", expr, file, line);
__fatal_error("");
+ while (1);
}
#endif