From a7c13f535fce9890cc7e10d0cf4a62c2d2f8411f Mon Sep 17 00:00:00 2001 From: Po Lu Date: Thu, 24 Aug 2023 05:13:23 +0000 Subject: [PATCH] Stifle a compiler warning under GCC 13 * src/haiku_support.cc (MessageReceived): Shun snprintf, as GCC produces false positives cautioning against truncation. --- src/haiku_support.cc | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/haiku_support.cc b/src/haiku_support.cc index d5649e4d2ce..12a84687180 100644 --- a/src/haiku_support.cc +++ b/src/haiku_support.cc @@ -3315,9 +3315,7 @@ class EmacsFilePanelCallbackLooper : public BLooper { str_buf = (char *) alloca (std::strlen (str_path) + std::strlen (name) + 2); - snprintf (str_buf, std::strlen (str_path) - + std::strlen (name) + 2, "%s/%s", - str_path, name); + sprintf (str_buf, "%s/%s", str_path, name); file_name = strdup (str_buf); } } -- 2.39.2