Files
allwpilib/upstream_utils/libuv_patches/0010-Squelch-Apple-Clang-sprintf-deprecation-warning.patch

29 lines
1.0 KiB
Diff
Raw Normal View History

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Tyler Veness <calcmogul@gmail.com>
Date: Wed, 7 Jun 2023 21:04:19 -0700
Subject: [PATCH 10/10] Squelch Apple Clang sprintf deprecation warning
---
src/inet.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/src/inet.c b/src/inet.c
index 1b190255ed5f4813428dbb3ba81a50cfd26c5bf1..57e5c042ef8adb880279f94bcccc70f78df338fc 100644
--- a/src/inet.c
+++ b/src/inet.c
@@ -139,7 +139,14 @@ static int inet_ntop6(const unsigned char *src, char *dst, size_t size) {
tp += strlen(tp);
break;
}
+#if defined(__APPLE__) && defined(__clang__)
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+#endif // defined(__APPLE__) && defined(__clang__)
tp += sprintf(tp, "%x", words[i]);
+#if defined(__APPLE__) && defined(__clang__)
+#pragma clang diagnostic pop
+#endif // defined(__APPLE__) && defined(__clang__)
}
/* Was it a trailing run of 0x00's? */
if (best.base != -1 && (best.base + best.len) == ARRAY_SIZE(words))