diff --git a/uppsrc/Core/Core.h b/uppsrc/Core/Core.h index 6408cccd9..5cc6bace1 100644 --- a/uppsrc/Core/Core.h +++ b/uppsrc/Core/Core.h @@ -231,7 +231,9 @@ enum { INVALID_SOCKET = -1, +#ifndef TCP_NODELAY // macos defines it as macro, with the same value 1 TCP_NODELAY = 1, +#endif SD_RECEIVE = 0, SD_SEND = 1, SD_BOTH = 2, diff --git a/uppsrc/Core/CvFlt.cpp b/uppsrc/Core/CvFlt.cpp index ee5a9adcf..188411d9b 100644 --- a/uppsrc/Core/CvFlt.cpp +++ b/uppsrc/Core/CvFlt.cpp @@ -85,9 +85,9 @@ void sF128::MulPow10(int powi) LTIMING("MulPow10"); ASSERT(l == 0); // we can only do F64xF128 multiplication const auto& pow10 = ipow10table[powi + 350]; - uint64 hh, midh, midl; + uint64 hh, midh; l = mul64(h, pow10.h, hh); - midl = mul64(h, pow10.l, midh); + mul64(h, pow10.l, midh); h = hh + addc64(l, midh, 0); exponent += pow10.exponent; if((h & ((uint64)1 << 63)) == 0) { // renormalize diff --git a/uppsrc/CtrlLib/Cocoa.mm b/uppsrc/CtrlLib/Cocoa.mm index 7c0d3c59e..048f7e5d8 100644 --- a/uppsrc/CtrlLib/Cocoa.mm +++ b/uppsrc/CtrlLib/Cocoa.mm @@ -20,18 +20,13 @@ FileSelNative& FileSelNative::AllFilesType() } bool FileSelNative::Execute0(int open, const char *title) -{ +{ path.Clear(); Ctrl::ReleaseCtrlCapture(); if(!title) title = open ? t_("Open") : t_("Save as"); CFRef mmtitle = CFStringCreateWithCString(NULL, title, kCFStringEncodingUTF8); - NSWindow *window = nil; - Ctrl *win = Ctrl::GetActiveWindow(); - if(win) - window = (NSWindow *)win->GetNSWindow(); - if(open) { NSOpenPanel *panel = [NSOpenPanel openPanel]; [panel setAllowsMultipleSelection: multi ? YES : NO]; diff --git a/uppsrc/RichText/TablePaint.cpp b/uppsrc/RichText/TablePaint.cpp index 5344d8708..3d61a852e 100644 --- a/uppsrc/RichText/TablePaint.cpp +++ b/uppsrc/RichText/TablePaint.cpp @@ -240,7 +240,6 @@ RichCaret RichTable::GetCaret(int pos, RichContext rc) const ASSERT(pos >= 0); int nx = format.column.GetCount(); int ny = cell.GetCount(); - int ti = 0; const TabLayout& tab = Realize(rc); for(int i = 0; i < ny; i++) { const PaintRow& pr = tab[i]; @@ -252,7 +251,6 @@ RichCaret RichTable::GetCaret(int pos, RichContext rc) const int l = cl.text.GetLength() + 1; if(pos < l) return cl.GetCaret(pos, pr[j].MakeRichContext(MakeRichContext(rc, pr.py)), pyy); - ti += cl.text.GetTableCount(); pos -= l; } } diff --git a/uppsrc/RichText/TxtPaint.cpp b/uppsrc/RichText/TxtPaint.cpp index 72dd501ac..39129c85d 100644 --- a/uppsrc/RichText/TxtPaint.cpp +++ b/uppsrc/RichText/TxtPaint.cpp @@ -162,7 +162,6 @@ void RichTxt::Paint(PageDraw& pw, RichContext& rc, const PaintInfo& _pi) const { PaintInfo pi = _pi; int parti = 0; - int pos = 0; RichPara::Number n; while(rc.py < pi.bottom && parti < part.GetCount()) { if(part[parti].Is()) { @@ -202,7 +201,6 @@ void RichTxt::Paint(PageDraw& pw, RichContext& rc, const PaintInfo& _pi) const pi.highlightpara -= l; pi.sell -= l; pi.selh -= l; - pos += l; ++parti; } } diff --git a/uppsrc/TextDiffCtrl/TextCtrl.cpp b/uppsrc/TextDiffCtrl/TextCtrl.cpp index c4fa7af47..bf1b9f39d 100644 --- a/uppsrc/TextDiffCtrl/TextCtrl.cpp +++ b/uppsrc/TextDiffCtrl/TextCtrl.cpp @@ -47,7 +47,6 @@ void TextCompareCtrl::DoSelection(int y, bool shift) void TextCompareCtrl::LeftDown(Point pt, dword keyflags) { - Size sz = GetSize(); DoSelection(pt.y, keyflags & K_SHIFT); SetCapture(); SetWantFocus(); diff --git a/uppsrc/ide/Assist.cpp b/uppsrc/ide/Assist.cpp index 5f17c510e..051052469 100644 --- a/uppsrc/ide/Assist.cpp +++ b/uppsrc/ide/Assist.cpp @@ -670,7 +670,6 @@ int AssistEditor::ToUtf8x(int line, int pos) int AssistEditor::FromUtf8x(int line, int pos) { // libclang treats utf-8 bytes as whole characters if(line < GetLineCount() && GetLineLength(line) < 1000) { - bool isutf8 = false; const String& h = GetUtf8Line(line); if(pos <= h.GetCount()) for(const char ch : h) @@ -684,7 +683,6 @@ void AssistEditor::Assist(bool macros) { LTIMING("Assist"); CloseAssist(); - int q = GetCursor32(); assist_type.Clear(); assist_item.Clear(); include_assist = false; @@ -965,7 +963,7 @@ void AssistEditor::AssistInsert() ch++; Remove(cl, ch - cl); SetCursor(cl); - int n = Paste(ToUnicode(txt, CHARSET_WIN1250)); + Paste(ToUnicode(txt, CHARSET_WIN1250)); if(param_count > 0) { SetCursor(GetCursor32() - 1); StartParamInfo(f, cl); diff --git a/uppsrc/ide/FormatCode.cpp b/uppsrc/ide/FormatCode.cpp index c05212d8f..a22dda922 100644 --- a/uppsrc/ide/FormatCode.cpp +++ b/uppsrc/ide/FormatCode.cpp @@ -518,7 +518,6 @@ void ReformatDlg::Set(Stream& in) int ii = 0; String master_id; for(const ClangFormat& f : clang_format) { - int x = 0; String id = f.id; if(*id == ' ') id = master_id + ":" + TrimBoth(id); diff --git a/uppsrc/ide/InsertImage.cpp b/uppsrc/ide/InsertImage.cpp index 69420b803..3e535f137 100644 --- a/uppsrc/ide/InsertImage.cpp +++ b/uppsrc/ide/InsertImage.cpp @@ -15,6 +15,7 @@ struct InsertImageDlg : WithInsertImageLayout, Display { bool warning = false; void Paint(Draw& w, const Rect& r, const Value& q, Color ink, Color paper, dword style) const override; + void Paint(Draw& w) override { return TopWindow::Paint(w); } // silence clang warning void Layout() override; void Serialize(Stream& s) override { SerializePlacement(s); s % noupp % index; } diff --git a/uppsrc/ide/Navigator.cpp b/uppsrc/ide/Navigator.cpp index bcb74484d..0d6dfb769 100644 --- a/uppsrc/ide/Navigator.cpp +++ b/uppsrc/ide/Navigator.cpp @@ -142,7 +142,6 @@ void Navigator::Navigate() navigating = true; int ii = list.GetCursor(); if(theide && ii >= 0 && ii < litem.GetCount()) { - int ln = GetCurrentLine() + 1; const NavItem& m = *litem[ii]; if(m.kind == KIND_NEST) { String h = m.pretty; @@ -311,8 +310,6 @@ void Navigator::Search() sortitems.Check(sorting); String s = TrimBoth(~search); String search_name, search_nest; - bool wholeclass = false; - bool both = false; navigator_global = false; if(s.Find('.') >= 0) { Vector h = Split((String)~search, '.'); @@ -323,12 +320,9 @@ void Navigator::Search() if(h.GetCount()) search_nest = Join(h, "::"); } - wholeclass = *s == '.' && search_nest.GetCount(); } - else { + else search_name = ~search; - both = true; - } s = Join(Split(s, '.'), "::") + (s.EndsWith(".") ? "::" : ""); int lineno = StrInt(s); nitem.Clear(); @@ -348,7 +342,6 @@ void Navigator::Search() } else if(IsNull(s) && !sorting) { - bool sch = GetFileExt(theide->editfile) == ".sch"; Ide *theide = TheIde(); if(theide) for(const AnnotationItem& m : theide->editor.annotations) { diff --git a/uppsrc/ide/clang/Indexer.cpp b/uppsrc/ide/clang/Indexer.cpp index bb27c3b81..b450481d8 100644 --- a/uppsrc/ide/clang/Indexer.cpp +++ b/uppsrc/ide/clang/Indexer.cpp @@ -179,7 +179,6 @@ void Indexer::IndexerThread() Clang clang; clang_CXIndex_setGlobalOptions(clang.index, CXGlobalOpt_ThreadBackgroundPriorityForIndexing); int tm0 = msecs(); - bool was_job = false; // for diagnostics ++running_indexers; while(!Thread::IsShutdownThreads()) { Job job; @@ -190,7 +189,6 @@ void Indexer::IndexerThread() job = jobs[jobi++]; else break; - was_job = true; } if(Thread::IsShutdownThreads()) diff --git a/uppsrc/ide/clang/macros.cpp b/uppsrc/ide/clang/macros.cpp index fecc87c21..8f60c268e 100644 --- a/uppsrc/ide/clang/macros.cpp +++ b/uppsrc/ide/clang/macros.cpp @@ -5,6 +5,7 @@ //#BLITZ_PROHIBIT +#ifdef PLATFORM_WIN32 const char umacros[] = R"(#define CHECK_GRID(g) #define CHECK_MATRIX(g) @@ -816,6 +817,8 @@ R"(#define CHECK_GRID(g) #define _stdcall __attribute__((__stdcall__)) #define _thiscall __attribute__((__thiscall__)))"; +#endif + String RedefineMacros() { String cmdline; diff --git a/uppsrc/ide/ide.cpp b/uppsrc/ide/ide.cpp index 36924e7de..3dbebb498 100644 --- a/uppsrc/ide/ide.cpp +++ b/uppsrc/ide/ide.cpp @@ -633,7 +633,6 @@ struct IndexerProgress : ImageMaker { void Ide::SyncClang() { Vector a; - Color display_ink = Null; int phase = msecs() / 30; // TODO: Use phase auto AnimColor = [](int animator) { return Blend(IsDarkTheme() ? GrayColor(70) : SColorLtFace(), Color(198, 170, 0), animator);