From 35a1e846eb1bc9e1101dc4057f1cfdba2a2a5405 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20Lindel=C3=B6w?= Date: Wed, 15 Apr 2026 16:54:09 +0200 Subject: [PATCH] Fix unsued do_wrap warnings in tests --- include/tinycsocket.h | 2 +- src/tinycsocket_internal.h | 2 +- t | 70 -------------------------------------- tests/tests.cpp | 2 +- 4 files changed, 3 insertions(+), 73 deletions(-) delete mode 100644 t diff --git a/include/tinycsocket.h b/include/tinycsocket.h index 86f96a1..6be40f3 100644 --- a/include/tinycsocket.h +++ b/include/tinycsocket.h @@ -29,7 +29,7 @@ #ifndef TINYCSOCKET_INTERNAL_H_ #define TINYCSOCKET_INTERNAL_H_ -static const char* const TCS_VERSION_TXT = "v0.3.66"; +static const char* const TCS_VERSION_TXT = "v0.3.67"; static const char* const TCS_LICENSE_TXT = "Copyright 2018 Markus Lindelöw\n" "\n" diff --git a/src/tinycsocket_internal.h b/src/tinycsocket_internal.h index f5d1c52..fdef499 100644 --- a/src/tinycsocket_internal.h +++ b/src/tinycsocket_internal.h @@ -23,7 +23,7 @@ #ifndef TINYCSOCKET_INTERNAL_H_ #define TINYCSOCKET_INTERNAL_H_ -static const char* const TCS_VERSION_TXT = "v0.3.66"; +static const char* const TCS_VERSION_TXT = "v0.3.67"; static const char* const TCS_LICENSE_TXT = "Copyright 2018 Markus Lindelöw\n" "\n" diff --git a/t b/t deleted file mode 100644 index 1c908ae..0000000 --- a/t +++ /dev/null @@ -1,70 +0,0 @@ -diff --git a/include/tinycsocket.h b/include/tinycsocket.h -index 5036e60..b06ef0c 100644 ---- a/include/tinycsocket.h -+++ b/include/tinycsocket.h -@@ -29,7 +29,7 @@ - #ifndef TINYCSOCKET_INTERNAL_H_ - #define TINYCSOCKET_INTERNAL_H_ -  --static const char* const TCS_VERSION_TXT = "v0.3.59"; -+static const char* const TCS_VERSION_TXT = "v0.3.60"; - static const char* const TCS_LICENSE_TXT = - "Copyright 2018 Markus Lindelöw\n" - "\n" -@@ -191,10 +191,9 @@ typedef unsigned int TcsInterfaceId; // TODO: GUID is used for in vista at newer - #elif defined(TINYCSOCKET_USE_POSIX_IMPL) -  - #if defined(TINYCSOCKET_IMPLEMENTATION) || defined(TCS_DEFINE_POSIX_MACROS) --// POSIX feature test macros must be set before any system header is included. --// Without these, glibc's (pulled in by ) locks in --// strict C99 defaults that hide AI_PASSIVE, struct addrinfo, struct timeval, --// u_short, SO_REUSEPORT, etc. -+// Only needed on glibc/Cygwin where -std=c99 restricts symbol visibility. -+// On BSD/musl, setting these RESTRICTS visibility instead of expanding it. -+#if defined(__linux__) || defined(__CYGWIN__) - #ifndef _XOPEN_SOURCE - #define _XOPEN_SOURCE 600 - #endif -@@ -208,6 +207,7 @@ typedef unsigned int TcsInterfaceId; // TODO: GUID is used for in vista at newer - #define _DEFAULT_SOURCE - #endif - #endif -+#endif -  - typedef int TcsSocket; - typedef unsigned int TcsInterfaceId; -diff --git a/src/tinycsocket_internal.h b/src/tinycsocket_internal.h -index a2c5b27..3c4db85 100644 ---- a/src/tinycsocket_internal.h -+++ b/src/tinycsocket_internal.h -@@ -23,7 +23,7 @@ - #ifndef TINYCSOCKET_INTERNAL_H_ - #define TINYCSOCKET_INTERNAL_H_ -  --static const char* const TCS_VERSION_TXT = "v0.3.59"; -+static const char* const TCS_VERSION_TXT = "v0.3.60"; - static const char* const TCS_LICENSE_TXT = - "Copyright 2018 Markus Lindelöw\n" - "\n" -@@ -185,10 +185,9 @@ typedef unsigned int TcsInterfaceId; // TODO: GUID is used for in vista at newer - #elif defined(TINYCSOCKET_USE_POSIX_IMPL) -  - #if defined(TINYCSOCKET_IMPLEMENTATION) || defined(TCS_DEFINE_POSIX_MACROS) --// POSIX feature test macros must be set before any system header is included. --// Without these, glibc's (pulled in by ) locks in --// strict C99 defaults that hide AI_PASSIVE, struct addrinfo, struct timeval, --// u_short, SO_REUSEPORT, etc. -+// Only needed on glibc/Cygwin where -std=c99 restricts symbol visibility. -+// On BSD/musl, setting these RESTRICTS visibility instead of expanding it. -+#if defined(__linux__) || defined(__CYGWIN__) - #ifndef _XOPEN_SOURCE - #define _XOPEN_SOURCE 600 - #endif -@@ -202,6 +201,7 @@ typedef unsigned int TcsInterfaceId; // TODO: GUID is used for in vista at newer - #define _DEFAULT_SOURCE - #endif - #endif -+#endif -  - typedef int TcsSocket; - typedef unsigned int TcsInterfaceId; diff --git a/tests/tests.cpp b/tests/tests.cpp index a263364..d8e84ad 100644 --- a/tests/tests.cpp +++ b/tests/tests.cpp @@ -62,7 +62,7 @@ static inline double log10(unsigned int x) #define CHECK_NO_LEAK(pre) CHECK(TCS_MEM_DIFF() == (pre)) #else #define TCS_MEM_DIFF() 0 -#define CHECK_NO_LEAK(pre) ((void)0) +#define CHECK_NO_LEAK(pre) ((void)(pre)) #endif int main(int argc, char** argv)