From 91f4b6cf01c393b956574de49d8ddc20235be607 Mon Sep 17 00:00:00 2001 From: tmatis Date: Sun, 5 Nov 2023 18:29:40 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20fix=20unwanted=20build=20error?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- libft/includes/ft_test.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/libft/includes/ft_test.h b/libft/includes/ft_test.h index 24d39c7..f73c533 100644 --- a/libft/includes/ft_test.h +++ b/libft/includes/ft_test.h @@ -8,6 +8,7 @@ #include #include #include +#include typedef struct timeval timeval; @@ -131,10 +132,10 @@ extern tests_tracker test_tracker; " is " C_BOLD C_RED "equal" C_RESET); #define assert_string_equal(a, b) \ - if (!a) \ + if ((uintptr_t)NULL == (uintptr_t)a) \ fail("Assertion failed: " C_BOLD "assert_string_equal(" #a ", " #b ") " C_RESET #a \ " is " C_BOLD C_RED "null" C_RESET); \ - else if (!b) \ + else if ((uintptr_t)NULL == (uintptr_t)b) \ fail("Assertion failed: " C_BOLD "assert_string_equal(" #a ", " #b ") " C_RESET #b \ " is " C_BOLD C_RED "null" C_RESET); \ else if (ft_strcmp(a, b) == 0) \