about summary refs log tree commit diff
path: root/test/unittests/unit_maybe_alloc.c
diff options
context:
space:
mode:
authorDominik Maier <domenukk@gmail.com>2020-08-07 17:20:24 +0200
committerDominik Maier <domenukk@gmail.com>2020-08-07 17:20:24 +0200
commitfd9a7e719d3c1f236908a9c356cb90110aed24d7 (patch)
tree76d890f05c0eeb971e6ae4789041464aca2642f8 /test/unittests/unit_maybe_alloc.c
parente51f1ea5a5dd630dec9bfcd668db4ea583fa72d1 (diff)
downloadafl++-fd9a7e719d3c1f236908a9c356cb90110aed24d7.tar.gz
fixed wextra
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),