Skip to content

Commit 3adb262

Browse files
authored
C library: declare malloc (rust-lang#3296)
In rust-lang#1812 we removed standard library includes and instead provided forward declarations of `free`, `calloc`, and `memcpy` -- but seemingly forgot to include `malloc`, which we also use. This avoids a warning seen when dialling up `goto-cc` verbosity.
1 parent c8746e2 commit 3adb262

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

library/kani/kani_lib.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
void free(void *ptr);
99
void *memcpy(void *dst, const void *src, size_t n);
1010
void *calloc(size_t nmemb, size_t size);
11+
void *malloc(size_t size);
1112

1213
typedef __CPROVER_bool bool;
1314

0 commit comments

Comments
 (0)