From f0737787eb02093defc30de05a731ffe63c4c6f4 Mon Sep 17 00:00:00 2001 From: Sam James Date: Sun, 17 Mar 2024 07:35:36 +0000 Subject: [PATCH 1/3] tests: add missing header for `difftime` MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit With GCC 14, which makes implicit function declarations an error by default: ``` TestReadMask.c: In function ‘ElapsedTime’: TestReadMask.c:746:15: error: implicit declaration of function ‘difftime’ [-Wimplicit-function-declaration] 746 | ms = (int)difftime(end_time.tv_sec, start_time.tv_sec); | ^~~~~~~~ TestReadMask.c:62:1: note: ‘difftime’ is defined in header ‘’; this is probably fixable by adding ‘#include ’ 61 | #include +++ |+#include 62 | ``` Fix the include guards and include unconditionally (for difftime) and unconditionally too (for memcpy). Signed-off-by: Sam James --- tests/TestReadMask.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/tests/TestReadMask.c b/tests/TestReadMask.c index 105f1f82..55106e38 100644 --- a/tests/TestReadMask.c +++ b/tests/TestReadMask.c @@ -51,13 +51,12 @@ product endorsement purposes. */ #include #include +#include #ifndef _WIN32 #include -#else -#include -#include #endif #include +#include #include /* To compile this program on hyper, here is the command: From 43f090f9070fd97898367d75f4ee1b7d70399f1c Mon Sep 17 00:00:00 2001 From: "Mark C. Miller" Date: Tue, 3 Sep 2024 10:58:11 -0700 Subject: [PATCH 2/3] WS change to trigger CI --- tests/TestReadMask.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/TestReadMask.c b/tests/TestReadMask.c index 55106e38..51cfc859 100644 --- a/tests/TestReadMask.c +++ b/tests/TestReadMask.c @@ -49,6 +49,7 @@ reflect those of the United States Government or Lawrence Livermore National Security, LLC, and shall not be used for advertising or product endorsement purposes. */ + #include #include #include From ab4af16dec278b4ffe87431eb771e7c26602d5fb Mon Sep 17 00:00:00 2001 From: "Mark C. Miller" Date: Tue, 3 Sep 2024 11:09:42 -0700 Subject: [PATCH 3/3] Undo last WS change --- tests/TestReadMask.c | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/TestReadMask.c b/tests/TestReadMask.c index 51cfc859..55106e38 100644 --- a/tests/TestReadMask.c +++ b/tests/TestReadMask.c @@ -49,7 +49,6 @@ reflect those of the United States Government or Lawrence Livermore National Security, LLC, and shall not be used for advertising or product endorsement purposes. */ - #include #include #include