All: Fix some warnings

This commit is contained in:
Vicki Pfau 2024-01-09 22:17:33 -08:00
parent 72a620a484
commit 2c5882df3e
3 changed files with 5 additions and 2 deletions

View File

@ -58,10 +58,11 @@ struct mDebuggerModule* mDebuggerCreateModule(enum mDebuggerType type, struct mC
break;
#endif
case DEBUGGER_NONE:
case DEBUGGER_ACCESS_LOGGER:
case DEBUGGER_CUSTOM:
case DEBUGGER_MAX:
free(debugger);
return 0;
return NULL;
break;
}

View File

@ -170,7 +170,7 @@ void mSDLGLCommonRunloop(struct mSDLRenderer* renderer, void* user) {
renderer->core->currentVideoSize(renderer->core, &renderer->width, &renderer->height);
struct mRectangle dims;
v->layerDimensions(v, VIDEO_LAYER_IMAGE, &dims);
if (renderer->width != dims.width || renderer->height != dims.height) {
if (dims.width < 0 || dims.height < 0 || renderer->width != (unsigned) dims.width || renderer->height != (unsigned) dims.height) {
renderer->core->setVideoBuffer(renderer->core, renderer->outputBuffer, renderer->width);
dims.width = renderer->width;
dims.height = renderer->height;

View File

@ -161,6 +161,8 @@ bool SfoWrite(struct Table* sfo, struct VFile* vf) {
case PSF_TYPE_U32:
sortedEntries[i].size = 4;
break;
default:
return false;
}
}
dataSize += ALIGN4(sortedEntries[i].size);