From 46ee1ab36013f0a6e8148c4e5a3fc794f92d87aa Mon Sep 17 00:00:00 2001
From: Christopher Fore <csfore@posteo.net>
Date: Sat, 6 Jan 2024 12:09:40 -0500
Subject: [PATCH] putty: fix compilation and warnings on GCC 14
GCC 14 is becoming stricter with its default errors now, resulting in
more incompatible pointer type errors.
---
src/putty/sftp.c | 2 +-
src/putty/unix/uxsftp.c | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/putty/sftp.c b/src/putty/sftp.c
index 8839553..6c6d6e4 100644
a
|
b
|
|
15 | 15 | #include "fzprintf.h" |
16 | 16 | #include "fzsftp.h" |
17 | 17 | |
18 | | static const char *fxp_error_message; |
| 18 | static char *fxp_error_message; |
19 | 19 | static int fxp_errtype; |
20 | 20 | |
21 | 21 | static void fxp_internal_error(const char *msg); |
diff --git a/src/putty/unix/uxsftp.c b/src/putty/unix/uxsftp.c
index f078d97..a25dba0 100644
a
|
b
|
int read_from_file(RFile *f, void *buffer, int length)
|
211 | 211 | #if 1 |
212 | 212 | if (f->state == ok && !f->remaining_) { |
213 | 213 | fznotify1(sftp_io_nextbuf, 0); |
214 | | char const* s = priority_read(); |
| 214 | char *s = priority_read(); |
215 | 215 | if (s[1] == '-') { |
216 | 216 | f->state = error; |
217 | 217 | return -1; |
… |
… |
int read_from_file(RFile *f, void *buffer, int length)
|
220 | 220 | f->state = eof; |
221 | 221 | } |
222 | 222 | else { |
223 | | char const* p = s + 1; |
| 223 | char *p = s + 1; |
224 | 224 | f->buffer_ = f->memory_ + next_int(&p); |
225 | 225 | f->remaining_ = (int)next_int(&p); |
226 | 226 | } |