summaryrefslogtreecommitdiff
path: root/src/user/app/tests
diff options
context:
space:
mode:
authordzwdz2023-02-23 18:31:23 +0100
committerdzwdz2023-02-23 18:31:23 +0100
commit55224307bf9b3e4231daca9ad4c4e3b6d734869b (patch)
tree18e0e3cc897efe60c96d3ee2ed02cb60a4571611 /src/user/app/tests
parentc9daa8909313b020df57605d0bd50ac48b208d58 (diff)
fix: printf related warnings
Diffstat (limited to 'src/user/app/tests')
-rw-r--r--src/user/app/tests/shared/printf.c2
-rw-r--r--src/user/app/tests/tests.c2
2 files changed, 3 insertions, 1 deletions
diff --git a/src/user/app/tests/shared/printf.c b/src/user/app/tests/shared/printf.c
index 71122f5..d8df48a 100644
--- a/src/user/app/tests/shared/printf.c
+++ b/src/user/app/tests/shared/printf.c
@@ -2,6 +2,8 @@
#include <stdio.h>
#include <string.h>
+#pragma GCC diagnostic ignored "-Wformat-truncation"
+
static void test_printf(void) {
char buf[64];
memset(buf, '?', 64);
diff --git a/src/user/app/tests/tests.c b/src/user/app/tests/tests.c
index 7139fc7..2cb97cd 100644
--- a/src/user/app/tests/tests.c
+++ b/src/user/app/tests/tests.c
@@ -15,7 +15,7 @@ void run_test(void (*fn)()) {
} else {
/* successful tests must return 0 */
if (_sys_await() != 0) {
- test_failf("%p, base %p", (void*)fn - (void*)_image_base, _image_base);
+ test_failf("%p, base %p", (void*)((void*)fn - (void*)_image_base), _image_base);
}
}
}