Commit 9bca786
tests: fix tests when built against cmocka 1.1.8 or newer
CMocka 1.1.8 udate check for uintptr_t
Without including stdint, the test fails to compile (using GCC15) with
In file included from test-log.c:6:
test-log.c: In function ‘__wrap_dlog’:
test-log.c:23:20: error: ‘uintptr_t’ undeclared (first use in this function)
23 | expected = mock_ptr_type(char *);
| ^~~~~~~~~~~~~
test-log.c:10:1: note: ‘uintptr_t’ is defined in header ‘<stdint.h>’; this is probably fixable by adding ‘#include <stdint.h>’
9 | #include "debug.h"
+++ |+#include <stdint.h>
10 |
test-log.c:23:20: note: each undeclared identifier is reported only once for each function it appears in
23 | expected = mock_ptr_type(char *);
| ^~~~~~~~~~~~~
test-log.c:23:20: error: expected ‘)’ before ‘_mock’
23 | expected = mock_ptr_type(char *);
| ^~~~~~~~~~~~~
test-log.c:23:20: note: to match this ‘(’
23 | expected = mock_ptr_type(char *);
| ^~~~~~~~~~~~~
Reviewed-by: Martin Wilck <mwilck@suse.com>1 parent 3973293 commit 9bca786
1 file changed
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
4 | 5 | | |
5 | 6 | | |
6 | 7 | | |
| |||
0 commit comments