Ticket #13042: 0001-putty-fix-compilation-and-warnings-on-GCC-14.patch

File 0001-putty-fix-compilation-and-warnings-on-GCC-14.patch, 1.5 KB (added by Christopher Fore, 4 months ago)
  • src/putty/sftp.c

    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  
    1515#include "fzprintf.h"
    1616#include "fzsftp.h"
    1717
    18 static const char *fxp_error_message;
     18static char *fxp_error_message;
    1919static int fxp_errtype;
    2020
    2121static void fxp_internal_error(const char *msg);
  • src/putty/unix/uxsftp.c

    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)  
    211211#if 1
    212212    if (f->state == ok && !f->remaining_) {
    213213        fznotify1(sftp_io_nextbuf, 0);
    214         char const* s = priority_read();
     214        char *s = priority_read();
    215215        if (s[1] == '-') {
    216216            f->state = error;
    217217            return -1;
    int read_from_file(RFile *f, void *buffer, int length)  
    220220            f->state = eof;
    221221        }
    222222        else {
    223             char const* p = s + 1;
     223            char *p = s + 1;
    224224            f->buffer_ = f->memory_ + next_int(&p);
    225225            f->remaining_ = (int)next_int(&p);
    226226        }