From 1596195267a1649bd1fae1e67777b7549354cf15 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20R=C4=99bacz?= Date: Mon, 12 Jan 2026 08:18:05 +0100 Subject: [PATCH] Core, CtrlLib, RichEdit, ide: Fix warnigns on macOS. (#336) --- uppsrc/Core/SSL/AES.cpp | 6 +++--- uppsrc/CtrlLib/BeginnerInfo.cpp | 6 ------ uppsrc/RichEdit/DiagramEditor.h | 2 ++ uppsrc/RichEdit/DiagramRight.cpp | 7 +------ uppsrc/ide/Core/PPinfo.cpp | 7 ++----- 5 files changed, 8 insertions(+), 20 deletions(-) diff --git a/uppsrc/Core/SSL/AES.cpp b/uppsrc/Core/SSL/AES.cpp index 0a3ec9e79..f5d11b2f5 100644 --- a/uppsrc/Core/SSL/AES.cpp +++ b/uppsrc/Core/SSL/AES.cpp @@ -18,10 +18,10 @@ namespace { } Aes256Gcm::Aes256Gcm() -: iteration(AES_GCM_DEFAULT_ITERATION) -, chunksize(1024) -, ctx(nullptr) +: ctx(nullptr) , cipher(nullptr) +, chunksize(1024) +, iteration(AES_GCM_DEFAULT_ITERATION) { SslInitThread(); diff --git a/uppsrc/CtrlLib/BeginnerInfo.cpp b/uppsrc/CtrlLib/BeginnerInfo.cpp index 0c2cf4134..7a244146d 100644 --- a/uppsrc/CtrlLib/BeginnerInfo.cpp +++ b/uppsrc/CtrlLib/BeginnerInfo.cpp @@ -70,12 +70,6 @@ void PaintBasicHints(Ctrl *ctrl, Draw& w, const Rect& cr, const char *qtf, const r.tm = msecs(); } - typedef bool (*MouseHook)(Ctrl *ctrl, bool inframe, int event, Point p, - int zdelta, dword keyflags); - typedef bool (*KeyHook)(Ctrl *ctrl, dword key, int count); - typedef bool (*StateHook)(Ctrl *ctrl, int reason); - typedef void (*PaintHook)(Ctrl *ctrl, Draw& draw, const Rect& clip); - static auto Stop = [](bool testmousepos = false) { int tm = msecs(); Point mousepos; diff --git a/uppsrc/RichEdit/DiagramEditor.h b/uppsrc/RichEdit/DiagramEditor.h index fe0146439..3cb71baec 100644 --- a/uppsrc/RichEdit/DiagramEditor.h +++ b/uppsrc/RichEdit/DiagramEditor.h @@ -64,6 +64,8 @@ public: private: struct DropColumns : public MultiButton, public Display { ColumnPopUp popup; + + using MultiButton::Paint; void Paint(Draw& w, const Rect& r, const Value& q, Color ink, Color paper, dword style) const override; DropColumns(); diff --git a/uppsrc/RichEdit/DiagramRight.cpp b/uppsrc/RichEdit/DiagramRight.cpp index 2b10d4c2c..33f1b4999 100644 --- a/uppsrc/RichEdit/DiagramRight.cpp +++ b/uppsrc/RichEdit/DiagramRight.cpp @@ -78,14 +78,9 @@ void DiagramEditor::RightDown(Point p, dword keyflags) mdata = LoadFile(path); if(IsNull(mdata)) return; - bool loaded = false; - if(IsSVG(mdata)) { - loaded = true; - } - else { + if(!IsSVG(mdata)) { StringStream ss(mdata); One r = StreamRaster::OpenAny(ss); - loaded = true; } if(IsNull(size)) { Exclamation(t_("Unsupported image format.")); diff --git a/uppsrc/ide/Core/PPinfo.cpp b/uppsrc/ide/Core/PPinfo.cpp index 3572560b3..bc0197efa 100644 --- a/uppsrc/ide/Core/PPinfo.cpp +++ b/uppsrc/ide/Core/PPinfo.cpp @@ -80,7 +80,6 @@ void PPInfo::PPFile::Parse(Stream& in) guarded = false; blitz = AUTO; - int linei = 0; bool incomment = false; String guard_id; @@ -120,7 +119,6 @@ void PPInfo::PPFile::Parse(Stream& in) while(*l.Last() == '\\' && !in.IsEof()) { l.TrimLast(); - linei++; l.Cat(in.GetLine()); } @@ -197,14 +195,13 @@ void PPInfo::PPFile::Parse(Stream& in) } } catch(...) {} - if(first) + if(first) { for(char s : l) if(s != ' ' && s != '\t') { first = false; break; } - - linei++; + } } }