mirror of https://github.com/mgba-emu/mgba.git
All: Clean up some warnings
This commit is contained in:
parent
f3209e1942
commit
e8a39fea95
|
@ -21,7 +21,7 @@ extern const int GBASIOCyclesPerTransfer[4][MAX_GBAS];
|
|||
mLOG_DECLARE_CATEGORY(GBA_SIO);
|
||||
|
||||
enum {
|
||||
RCNT_INITIAL = 0x8000
|
||||
RCNT_INITIAL = -0x8000
|
||||
};
|
||||
|
||||
enum {
|
||||
|
|
|
@ -242,7 +242,7 @@ void mCoreConfigDirectory(char* out, size_t outLength) {
|
|||
CreateDirectoryW(wpath, NULL);
|
||||
if (PATH_SEP[0] != '\\') {
|
||||
WCHAR* pathSep;
|
||||
for (pathSep = wpath; pathSep = wcschr(pathSep, L'\\');) {
|
||||
for (pathSep = wpath; (pathSep = wcschr(pathSep, L'\\'));) {
|
||||
pathSep[0] = PATH_SEP[0];
|
||||
}
|
||||
}
|
||||
|
@ -284,7 +284,7 @@ void mCoreConfigPortablePath(char* out, size_t outLength) {
|
|||
PathRemoveFileSpecW(wpath);
|
||||
if (PATH_SEP[0] != '\\') {
|
||||
WCHAR* pathSep;
|
||||
for (pathSep = wpath; pathSep = wcschr(pathSep, L'\\');) {
|
||||
for (pathSep = wpath; (pathSep = wcschr(pathSep, L'\\'));) {
|
||||
pathSep[0] = PATH_SEP[0];
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1584,6 +1584,9 @@ IOViewer::IOViewer(std::shared_ptr<CoreController> controller, QWidget* parent)
|
|||
m_width = 1;
|
||||
break;
|
||||
#endif
|
||||
case mPLATFORM_NONE:
|
||||
maxRegs = 0;
|
||||
break;
|
||||
}
|
||||
|
||||
for (unsigned i = 0; i < maxRegs; ++i) {
|
||||
|
|
|
@ -473,7 +473,7 @@ void Window::parseCard() {
|
|||
QString("oh"), QMessageBox::Ok);
|
||||
dialog->setAttribute(Qt::WA_DeleteOnClose);
|
||||
auto status = std::make_shared<QPair<int, int>>(0, filenames.size());
|
||||
GBAApp::app()->submitWorkerJob([filenames, dialog, status]() {
|
||||
GBAApp::app()->submitWorkerJob([filenames, status]() {
|
||||
int success = 0;
|
||||
for (QString filename : filenames) {
|
||||
if (filename.isEmpty()) {
|
||||
|
@ -507,6 +507,9 @@ void Window::parseCard() {
|
|||
}
|
||||
status->first = success;
|
||||
}, [dialog, status]() {
|
||||
if (status->second == 0) {
|
||||
return;
|
||||
}
|
||||
dialog->setText(tr("%1 of %2 e-Reader cards converted successfully.").arg(status->first).arg(status->second));
|
||||
dialog->show();
|
||||
});
|
||||
|
|
|
@ -360,13 +360,17 @@ uint32_t _hashScalar(const struct mScriptValue* val) {
|
|||
*T = input->value.s32; \
|
||||
} else if (input->type->size == 8) { \
|
||||
*T = input->value.s64; \
|
||||
} \
|
||||
} else { \
|
||||
return false; \
|
||||
}\
|
||||
break; \
|
||||
case mSCRIPT_TYPE_UINT: \
|
||||
if (input->type->size <= 4) { \
|
||||
*T = input->value.u32; \
|
||||
} else if (input->type->size == 8) { \
|
||||
*T = input->value.u64; \
|
||||
} else { \
|
||||
return false; \
|
||||
} \
|
||||
break; \
|
||||
case mSCRIPT_TYPE_FLOAT: \
|
||||
|
@ -374,6 +378,8 @@ uint32_t _hashScalar(const struct mScriptValue* val) {
|
|||
*T = input->value.f32; \
|
||||
} else if (input->type->size == 8) { \
|
||||
*T = input->value.f64; \
|
||||
} else { \
|
||||
return false; \
|
||||
} \
|
||||
break; \
|
||||
default: \
|
||||
|
|
Loading…
Reference in New Issue