mirror of https://github.com/mgba-emu/mgba.git
All: Minor warning touching up
This commit is contained in:
parent
9b2ba64bc6
commit
a64dcf8e43
|
@ -34,8 +34,8 @@ if(NOT MSVC)
|
||||||
# mingw32 likes to complain about using the "wrong" format strings despite them actually working
|
# mingw32 likes to complain about using the "wrong" format strings despite them actually working
|
||||||
set(WARNING_FLAGS "${WARNING_FLAGS} -Wno-format")
|
set(WARNING_FLAGS "${WARNING_FLAGS} -Wno-format")
|
||||||
endif()
|
endif()
|
||||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${WARNING_FLAGS} -Werror=implicit-function-declaration -Werror=implicit-int")
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${WARNING_FLAGS} -Werror=implicit-function-declaration -Werror=missing-parameter-type -Werror=implicit-int")
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${WARNING_FLAGS}")
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${WARNING_FLAGS} -Woverloaded-virtual")
|
||||||
else()
|
else()
|
||||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_CRT_SECURE_NO_WARNINGS /wd4003 /wd4244 /wd4146 /wd4267 /Zc:preprocessor-")
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_CRT_SECURE_NO_WARNINGS /wd4003 /wd4244 /wd4146 /wd4267 /Zc:preprocessor-")
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_CRT_SECURE_NO_WARNINGS /wd4003 /wd4244 /wd4146 /wd4267 /Zc:preprocessor-")
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_CRT_SECURE_NO_WARNINGS /wd4003 /wd4244 /wd4146 /wd4267 /Zc:preprocessor-")
|
||||||
|
|
|
@ -343,6 +343,7 @@ constexpr const char* ConfigController::mruName(ConfigController::MRU mru) {
|
||||||
case MRU::Script:
|
case MRU::Script:
|
||||||
return "recentScripts";
|
return "recentScripts";
|
||||||
}
|
}
|
||||||
|
Q_UNREACHABLE();
|
||||||
}
|
}
|
||||||
|
|
||||||
void ConfigController::write() {
|
void ConfigController::write() {
|
||||||
|
|
|
@ -178,7 +178,7 @@ void MemorySearch::refresh() {
|
||||||
mCoreMemorySearchResult* result = mCoreMemorySearchResultsGetPointer(&m_results, i);
|
mCoreMemorySearchResult* result = mCoreMemorySearchResultsGetPointer(&m_results, i);
|
||||||
QTableWidgetItem* item = new QTableWidgetItem(QString("%1").arg(result->address, 8, 16, QChar('0')));
|
QTableWidgetItem* item = new QTableWidgetItem(QString("%1").arg(result->address, 8, 16, QChar('0')));
|
||||||
m_ui.results->setItem(i, 0, item);
|
m_ui.results->setItem(i, 0, item);
|
||||||
QTableWidgetItem* type;
|
QTableWidgetItem* type = nullptr;
|
||||||
QByteArray string;
|
QByteArray string;
|
||||||
if (result->type == mCORE_MEMORY_SEARCH_INT && m_ui.numHex->isChecked()) {
|
if (result->type == mCORE_MEMORY_SEARCH_INT && m_ui.numHex->isChecked()) {
|
||||||
switch (result->width) {
|
switch (result->width) {
|
||||||
|
@ -213,7 +213,12 @@ void MemorySearch::refresh() {
|
||||||
string.append(core->rawRead8(core, result->address + i, result->segment));
|
string.append(core->rawRead8(core, result->address + i, result->segment));
|
||||||
}
|
}
|
||||||
item = new QTableWidgetItem(QLatin1String(string)); // TODO
|
item = new QTableWidgetItem(QLatin1String(string)); // TODO
|
||||||
|
break;
|
||||||
|
case mCORE_MEMORY_SEARCH_GUESS:
|
||||||
|
item = nullptr;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
Q_ASSERT(item);
|
||||||
}
|
}
|
||||||
QString divisor;
|
QString divisor;
|
||||||
if (result->guessDivisor > 1) {
|
if (result->guessDivisor > 1) {
|
||||||
|
@ -231,7 +236,12 @@ void MemorySearch::refresh() {
|
||||||
break;
|
break;
|
||||||
case mCORE_MEMORY_SEARCH_STRING:
|
case mCORE_MEMORY_SEARCH_STRING:
|
||||||
type = new QTableWidgetItem("string");
|
type = new QTableWidgetItem("string");
|
||||||
|
break;
|
||||||
|
case mCORE_MEMORY_SEARCH_GUESS:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
Q_ASSERT(type);
|
||||||
|
|
||||||
m_ui.results->setItem(i, 1, item);
|
m_ui.results->setItem(i, 1, item);
|
||||||
m_ui.results->setItem(i, 2, type);
|
m_ui.results->setItem(i, 2, type);
|
||||||
m_ui.opDelta->setEnabled(true);
|
m_ui.opDelta->setEnabled(true);
|
||||||
|
|
Loading…
Reference in New Issue