projects
/
emacs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
87bec7e
)
Stifle a compiler warning under GCC 13
author
Po Lu
<luangruo@yahoo.com>
Thu, 24 Aug 2023 05:13:23 +0000
(
05:13
+0000)
committer
Po Lu
<luangruo@yahoo.com>
Thu, 24 Aug 2023 05:13:23 +0000
(
05:13
+0000)
* src/haiku_support.cc (MessageReceived): Shun snprintf, as GCC
produces false positives cautioning against truncation.
src/haiku_support.cc
patch
|
blob
|
history
diff --git
a/src/haiku_support.cc
b/src/haiku_support.cc
index d5649e4d2ce4317ad32f79bd96ffe5c345aede92..12a84687180208c5fef9c91a4956e1e59f15a9f7 100644
(file)
--- 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);
}
}