From fe732487ade7a77f90f3b07d772593722367b77b Mon Sep 17 00:00:00 2001 From: Simon Tatham Date: Thu, 30 Jan 2020 06:40:21 +0000 Subject: [PATCH] Fix two accidental overwrites of 'flags'. When I came to actually remove the global 'flags' word, I found that I got compile failures in two functions that should never have been accessing it at all, because they forgot to declare _local_ variables of the same name. Yikes! (Of course, _now_ that's harmless, because I've just removed all the actual semantics from the global variable. But I'm about to remove the variable too, so these bugs would become compile failures.) (cherry picked from commit 33715c07e342248c5dfbfb38ad30707566453cc4) --- sftpserver.c | 1 + unix/gtkfont.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/sftpserver.c b/sftpserver.c index 1ff3d378..91711d59 100644 --- a/sftpserver.c +++ b/sftpserver.c @@ -15,6 +15,7 @@ struct sftp_packet *sftp_handle_request( { struct sftp_packet *reply; unsigned id; + uint32_t flags; ptrlen path, dstpath, handle, data; uint64_t offset; unsigned length; diff --git a/unix/gtkfont.c b/unix/gtkfont.c index 4e62fb34..f0e7e712 100644 --- a/unix/gtkfont.c +++ b/unix/gtkfont.c @@ -1107,7 +1107,7 @@ static void x11font_enum_fonts(GtkWidget *widget, * font, which we do by examining the spacing field * again. */ - flags = FONTFLAG_SERVERSIDE; + int flags = FONTFLAG_SERVERSIDE; if (!strchr("CcMm", xlfd->spacing[0])) flags |= FONTFLAG_NONMONOSPACED;