diff options
| author | Po Lu | 2023-08-24 05:13:23 +0000 |
|---|---|---|
| committer | Po Lu | 2023-08-24 05:13:23 +0000 |
| commit | a7c13f535fce9890cc7e10d0cf4a62c2d2f8411f (patch) | |
| tree | 785767efb76631e826c00481ed6012882643bf22 /src | |
| parent | 87bec7ea25c13dc28f9bc770a83e0dccfe0f85d5 (diff) | |
| download | emacs-a7c13f535fce9890cc7e10d0cf4a62c2d2f8411f.tar.gz emacs-a7c13f535fce9890cc7e10d0cf4a62c2d2f8411f.zip | |
Stifle a compiler warning under GCC 13
* src/haiku_support.cc (MessageReceived): Shun snprintf, as GCC
produces false positives cautioning against truncation.
Diffstat (limited to 'src')
| -rw-r--r-- | src/haiku_support.cc | 4 |
1 files changed, 1 insertions, 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 | |||
| 3315 | { | 3315 | { |
| 3316 | str_buf = (char *) alloca (std::strlen (str_path) | 3316 | str_buf = (char *) alloca (std::strlen (str_path) |
| 3317 | + std::strlen (name) + 2); | 3317 | + std::strlen (name) + 2); |
| 3318 | snprintf (str_buf, std::strlen (str_path) | 3318 | sprintf (str_buf, "%s/%s", str_path, name); |
| 3319 | + std::strlen (name) + 2, "%s/%s", | ||
| 3320 | str_path, name); | ||
| 3321 | file_name = strdup (str_buf); | 3319 | file_name = strdup (str_buf); |
| 3322 | } | 3320 | } |
| 3323 | } | 3321 | } |