From cace4f829d8f7a5a47719cbf00230af3d705d898 Mon Sep 17 00:00:00 2001 From: Martin Coufal Date: Wed, 31 Jan 2024 11:14:41 +0100 Subject: [PATCH] CI Tests: fix /tests/Sanity/basic-linking-sanity * use 'fclose' * add missing includes --- tests/Sanity/basic-linking-sanity/lc.c | 2 +- tests/Sanity/basic-linking-sanity/lm.c | 2 +- tests/Sanity/basic-linking-sanity/lpthread.c | 2 +- tests/Sanity/basic-linking-sanity/lrt.c | 3 ++- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/tests/Sanity/basic-linking-sanity/lc.c b/tests/Sanity/basic-linking-sanity/lc.c index 2b4f286..23679f4 100644 --- a/tests/Sanity/basic-linking-sanity/lc.c +++ b/tests/Sanity/basic-linking-sanity/lc.c @@ -15,7 +15,7 @@ int main(){ two[3] = '\0'; fprintf(fp, "Two: %s, length %d\n", two, strlen(two)); - close(fp); + fclose(fp); free(two); return 0; } diff --git a/tests/Sanity/basic-linking-sanity/lm.c b/tests/Sanity/basic-linking-sanity/lm.c index 72612b9..ca45637 100644 --- a/tests/Sanity/basic-linking-sanity/lm.c +++ b/tests/Sanity/basic-linking-sanity/lm.c @@ -8,6 +8,6 @@ int main(){ fprintf(fp, "SIN: %0.2f\n", 1.0); - close(fp); + fclose(fp); return 0; } diff --git a/tests/Sanity/basic-linking-sanity/lpthread.c b/tests/Sanity/basic-linking-sanity/lpthread.c index 65aca15..7ce81d7 100644 --- a/tests/Sanity/basic-linking-sanity/lpthread.c +++ b/tests/Sanity/basic-linking-sanity/lpthread.c @@ -41,6 +41,6 @@ int main(){ pthread_join(tw, NULL); pthread_join(on, NULL); - close(fp); + fclose(fp); return 0; } diff --git a/tests/Sanity/basic-linking-sanity/lrt.c b/tests/Sanity/basic-linking-sanity/lrt.c index 2a31e0d..daadf29 100644 --- a/tests/Sanity/basic-linking-sanity/lrt.c +++ b/tests/Sanity/basic-linking-sanity/lrt.c @@ -1,4 +1,5 @@ #include +#include #include int main(){ @@ -16,6 +17,6 @@ int main(){ else fprintf(fp, "shm_unlink successful\n"); - close(fp); + fclose(fp); return 0; }