Skip to content

Commit b8ec999

Browse files
committed
Fix cxx20 compiler warnings.
1 parent 9813375 commit b8ec999

File tree

14 files changed

+43
-44
lines changed

14 files changed

+43
-44
lines changed

arch/mips/mips/test.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ int main(int ac, char **av)
6161
uint32_t insword = 0;
6262
uint64_t baseaddr = 0;
6363
int instindex = 1;
64-
int c = 0;
6564
int version = -1;
6665
int flags = 0;
6766
int result = 0;

examples/triage/byte.cpp

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -67,30 +67,30 @@ ByteView::ByteView(QWidget* parent, BinaryViewRef data) : QAbstractScrollArea(pa
6767
m_updateTimer->setSingleShot(false);
6868
// connect(m_updateTimer, &QTimer::timeout, this, &ByteView::updateTimerEvent);
6969

70-
actionHandler()->bindAction("Move Cursor Up", UIAction([=]() { up(false); }));
71-
actionHandler()->bindAction("Move Cursor Down", UIAction([=]() { down(false); }));
72-
actionHandler()->bindAction("Move Cursor Left", UIAction([=]() { left(1, false); }));
73-
actionHandler()->bindAction("Move Cursor Right", UIAction([=]() { right(1, false); }));
74-
actionHandler()->bindAction("Move Cursor Word Left", UIAction([=]() { left(8, false); }));
75-
actionHandler()->bindAction("Move Cursor Word Right", UIAction([=]() { right(8, false); }));
76-
actionHandler()->bindAction("Extend Selection Up", UIAction([=]() { up(true); }));
77-
actionHandler()->bindAction("Extend Selection Down", UIAction([=]() { down(true); }));
78-
actionHandler()->bindAction("Extend Selection Left", UIAction([=]() { left(1, true); }));
79-
actionHandler()->bindAction("Extend Selection Right", UIAction([=]() { right(1, true); }));
80-
actionHandler()->bindAction("Extend Selection Word Left", UIAction([=]() { left(8, true); }));
81-
actionHandler()->bindAction("Extend Selection Word Right", UIAction([=]() { right(8, true); }));
82-
actionHandler()->bindAction("Page Up", UIAction([=]() { pageUp(false); }));
83-
actionHandler()->bindAction("Page Down", UIAction([=]() { pageDown(false); }));
84-
actionHandler()->bindAction("Extend Selection Page Up", UIAction([=]() { pageUp(true); }));
85-
actionHandler()->bindAction("Extend Selection Page Down", UIAction([=]() { pageDown(true); }));
86-
actionHandler()->bindAction("Move Cursor to Start of Line", UIAction([=]() { moveToStartOfLine(false); }));
87-
actionHandler()->bindAction("Move Cursor to End of Line", UIAction([=]() { moveToEndOfLine(false); }));
88-
actionHandler()->bindAction("Move Cursor to Start of View", UIAction([=]() { moveToStartOfView(false); }));
89-
actionHandler()->bindAction("Move Cursor to End of View", UIAction([=]() { moveToEndOfView(false); }));
90-
actionHandler()->bindAction("Extend Selection to Start of Line", UIAction([=]() { moveToStartOfLine(true); }));
91-
actionHandler()->bindAction("Extend Selection to End of Line", UIAction([=]() { moveToEndOfLine(true); }));
92-
actionHandler()->bindAction("Extend Selection to Start of View", UIAction([=]() { moveToStartOfView(true); }));
93-
actionHandler()->bindAction("Extend Selection to End of View", UIAction([=]() { moveToEndOfView(true); }));
70+
actionHandler()->bindAction("Move Cursor Up", UIAction([=, this]() { up(false); }));
71+
actionHandler()->bindAction("Move Cursor Down", UIAction([=, this]() { down(false); }));
72+
actionHandler()->bindAction("Move Cursor Left", UIAction([=, this]() { left(1, false); }));
73+
actionHandler()->bindAction("Move Cursor Right", UIAction([=, this]() { right(1, false); }));
74+
actionHandler()->bindAction("Move Cursor Word Left", UIAction([=, this]() { left(8, false); }));
75+
actionHandler()->bindAction("Move Cursor Word Right", UIAction([=, this]() { right(8, false); }));
76+
actionHandler()->bindAction("Extend Selection Up", UIAction([=, this]() { up(true); }));
77+
actionHandler()->bindAction("Extend Selection Down", UIAction([=, this]() { down(true); }));
78+
actionHandler()->bindAction("Extend Selection Left", UIAction([=, this]() { left(1, true); }));
79+
actionHandler()->bindAction("Extend Selection Right", UIAction([=, this]() { right(1, true); }));
80+
actionHandler()->bindAction("Extend Selection Word Left", UIAction([=, this]() { left(8, true); }));
81+
actionHandler()->bindAction("Extend Selection Word Right", UIAction([=, this]() { right(8, true); }));
82+
actionHandler()->bindAction("Page Up", UIAction([=, this]() { pageUp(false); }));
83+
actionHandler()->bindAction("Page Down", UIAction([=, this]() { pageDown(false); }));
84+
actionHandler()->bindAction("Extend Selection Page Up", UIAction([=, this]() { pageUp(true); }));
85+
actionHandler()->bindAction("Extend Selection Page Down", UIAction([=, this]() { pageDown(true); }));
86+
actionHandler()->bindAction("Move Cursor to Start of Line", UIAction([=, this]() { moveToStartOfLine(false); }));
87+
actionHandler()->bindAction("Move Cursor to End of Line", UIAction([=, this]() { moveToEndOfLine(false); }));
88+
actionHandler()->bindAction("Move Cursor to Start of View", UIAction([=, this]() { moveToStartOfView(false); }));
89+
actionHandler()->bindAction("Move Cursor to End of View", UIAction([=, this]() { moveToEndOfView(false); }));
90+
actionHandler()->bindAction("Extend Selection to Start of Line", UIAction([=, this]() { moveToStartOfLine(true); }));
91+
actionHandler()->bindAction("Extend Selection to End of Line", UIAction([=, this]() { moveToEndOfLine(true); }));
92+
actionHandler()->bindAction("Extend Selection to Start of View", UIAction([=, this]() { moveToStartOfView(true); }));
93+
actionHandler()->bindAction("Extend Selection to End of View", UIAction([=, this]() { moveToEndOfView(true); }));
9494
}
9595

9696

examples/triage/entropy.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ EntropyThread::EntropyThread(BinaryViewRef data, size_t blockSize, QImage* image
1212
m_blockSize = blockSize;
1313
m_updated = false;
1414
m_running = true;
15-
m_thread = std::thread([=]() { Run(); });
15+
m_thread = std::thread([=, this]() { Run(); });
1616
}
1717

1818

examples/triage/entry.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ EntryTreeView::EntryTreeView(EntryWidget* parent, TriageView* view, BinaryViewRe
160160

161161
// Allow view-specific shortcuts when imports are focused
162162
m_actionHandler.setupActionHandler(this);
163-
m_actionHandler.setActionContext([=]() { return m_view->actionContext(); });
163+
m_actionHandler.setActionContext([=, this]() { return m_view->actionContext(); });
164164

165165
m_model = new GenericEntryModel(this, m_data);
166166
setModel(m_model);

examples/triage/exports.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ GenericExportsModel::GenericExportsModel(QWidget* parent, BinaryViewRef data): Q
2828
m_updateTimer->setSingleShot(true);
2929
m_updateTimer->setInterval(500);
3030
connect(m_updateTimer, &QTimer::timeout, this, &GenericExportsModel::updateModel);
31-
connect(this, &GenericExportsModel::modelUpdate, this, [=]() {
31+
connect(this, &GenericExportsModel::modelUpdate, this, [=, this]() {
3232
if (m_updateTimer->isActive())
3333
return;
3434
m_updateTimer->start();
@@ -285,7 +285,7 @@ ExportsTreeView::ExportsTreeView(ExportsWidget* parent, TriageView* view, Binary
285285

286286
// Allow view-specific shortcuts when imports are focused
287287
m_actionHandler.setupActionHandler(this);
288-
m_actionHandler.setActionContext([=]() { return m_view->actionContext(); });
288+
m_actionHandler.setActionContext([=, this]() { return m_view->actionContext(); });
289289

290290
setFont(getMonospaceFont(this));
291291

@@ -306,11 +306,11 @@ ExportsTreeView::ExportsTreeView(ExportsWidget* parent, TriageView* view, Binary
306306
connect(selectionModel(), &QItemSelectionModel::currentChanged, this, &ExportsTreeView::exportSelected);
307307
connect(this, &QTreeView::doubleClicked, this, &ExportsTreeView::exportDoubleClicked);
308308

309-
connect(m_model, &QAbstractItemModel::modelAboutToBeReset, this, [=]() {
309+
connect(m_model, &QAbstractItemModel::modelAboutToBeReset, this, [=, this]() {
310310
m_selection = selectionModel()->selectedIndexes();
311311
m_scroll = verticalScrollBar()->value();
312312
});
313-
connect(m_model, &QAbstractItemModel::modelReset, this, [=]() {
313+
connect(m_model, &QAbstractItemModel::modelReset, this, [=, this]() {
314314
for (auto& idx : m_selection)
315315
{
316316
setCurrentIndex(idx);

examples/triage/files.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ TriageFilePicker::TriageFilePicker(UIContext* context)
4646
}
4747

4848
m_actionHandler.bindAction(
49-
"Open Selected Files", UIAction([=]() { openSelectedFiles(); }, [=]() { return areFilesSelected(); }));
49+
"Open Selected Files", UIAction([=, this]() { openSelectedFiles(); }, [=, this]() { return areFilesSelected(); }));
5050
m_contextMenu.addAction("Open Selected Files", "Open");
5151
}
5252

examples/triage/imports.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ ImportsTreeView::ImportsTreeView(ImportsWidget* parent, TriageView* view, Binary
232232

233233
// Allow view-specific shortcuts when imports are focused
234234
m_actionHandler.setupActionHandler(this);
235-
m_actionHandler.setActionContext([=]() { return m_view->actionContext(); });
235+
m_actionHandler.setActionContext([=, this]() { return m_view->actionContext(); });
236236

237237
m_model = new GenericImportsModel(this, m_data);
238238
setModel(m_model);

examples/triage/strings.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ StringsTreeView::StringsTreeView(StringsWidget* parent, TriageView* view, Binary
186186

187187
// Allow view-specific shortcuts when strings are focused
188188
m_actionHandler.setupActionHandler(this);
189-
m_actionHandler.setActionContext([=]() { return m_view->actionContext(); });
189+
m_actionHandler.setActionContext([=, this]() { return m_view->actionContext(); });
190190

191191
m_model = new GenericStringsModel(this, m_data);
192192
setModel(m_model);

objectivec/objc.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ void ObjCProcessor::DefineObjCSymbol(
272272
if (name.size() == 0 || addr == 0)
273273
return;
274274

275-
auto process = [=]() {
275+
auto process = [=, this]() {
276276
NameSpace nameSpace = m_data->GetInternalNameSpace();
277277
if (type == ExternalSymbol)
278278
{

view/elf/elfview.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2510,7 +2510,7 @@ void ElfView::DefineElfSymbol(BNSymbolType type, const string& incomingName, uin
25102510
if (gotEntry)
25112511
m_gotEntryLocations.emplace(addr);
25122512

2513-
auto process = [=]() {
2513+
auto process = [=, this]() {
25142514
NameSpace nameSpace = GetInternalNameSpace();
25152515
if (type == ExternalSymbol)
25162516
{

0 commit comments

Comments
 (0)