about summary refs log tree commit diff
path: root/test/unittests/unit_maybe_alloc.c
diff options
context:
space:
mode:
authorhexcoder- <heiko@hexco.de>2020-08-07 19:53:32 +0200
committerhexcoder- <heiko@hexco.de>2020-08-07 19:53:32 +0200
commit8551d8e48e18a5a50955945b5f73aff3cb492de5 (patch)
tree4e62bae271be851bd2e556d51e09197163814190 /test/unittests/unit_maybe_alloc.c
parent32558bc8072caa14ee670c6be40af4d183e8ffcc (diff)
parent934cdc32f4c828d6a8045e4096344601fe528a76 (diff)
downloadafl++-8551d8e48e18a5a50955945b5f73aff3cb492de5.tar.gz
Merge branch 'dev' of https://github.com/AFLplusplus/AFLplusplus into dev
Diffstat (limited to 'test/unittests/unit_maybe_alloc.c')
-rw-r--r--test/unittests/unit_maybe_alloc.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/test/unittests/unit_maybe_alloc.c b/test/unittests/unit_maybe_alloc.c
index 429d38ed..889ced8a 100644
--- a/test/unittests/unit_maybe_alloc.c
+++ b/test/unittests/unit_maybe_alloc.c
@@ -28,6 +28,7 @@ void __wrap_exit(int status);
 extern void exit(int status);
 extern void __real_exit(int status);
 void __wrap_exit(int status) {
+    (void) status;
     assert(0);
 }
 
@@ -35,8 +36,9 @@ int __wrap_printf(const char *format, ...);
 /* ignore all printfs */
 #undef printf
 extern int printf(const char *format, ...);
-extern int __real_printf(const char *format, ...);
+//extern int __real_printf(const char *format, ...);
 int __wrap_printf(const char *format, ...) {
+    (void)format;
     return 1;
 }
 
@@ -51,6 +53,7 @@ static int setup(void **state) {
 */
 
 static void test_null_allocs(void **state) {
+    (void)state;
 
     void *buf = NULL;
     size_t size = 0;
@@ -62,6 +65,7 @@ static void test_null_allocs(void **state) {
 }
 
 static void test_nonpow2_size(void **state) {
+    (void)state;
 
     char *buf = ck_alloc(150);
     size_t size = 150;
@@ -75,6 +79,7 @@ static void test_nonpow2_size(void **state) {
 }
 
 static void test_zero_size(void **state) {
+    (void)state;
 
     char *buf = NULL;
     size_t size = 0;
@@ -95,6 +100,7 @@ static void test_zero_size(void **state) {
 }
 
 static void test_unchanged_size(void **state) {
+    (void)state;
 
     void *buf = ck_alloc(100);
     size_t size = 100;
@@ -107,6 +113,7 @@ static void test_unchanged_size(void **state) {
 }
 
 static void test_grow_multiple(void **state) {
+    (void)state;
 
     char *buf = NULL;
     size_t size = 0;
@@ -146,6 +153,8 @@ static int teardown(void **state) {
 */
 
 int main(int argc, char **argv) {
+    (void)argc;
+    (void)argv;
 
 	const struct CMUnitTest tests[] = {
 		cmocka_unit_test(test_null_allocs),