[Scummvm-git-logs] scummvm master -> 5742e077aafedc760a6556fde9df2b4823b3338a
dreammaster
noreply at scummvm.org
Wed Oct 1 11:24:52 UTC 2025
This automated email contains information about 2 new commits which have been
pushed to the 'scummvm' repo located at https://api.github.com/repos/scummvm/scummvm .
Summary:
a4bf4328a6 BAGEL: MINIGAMES: Fix PDQ Coverity warnings
5742e077aa BAGEL: MINIGAMES: Fix Peggle Coverity warnings
Commit: a4bf4328a69c52113c3648d81b0b1040f056f64e
https://github.com/scummvm/scummvm/commit/a4bf4328a69c52113c3648d81b0b1040f056f64e
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2025-10-01T04:22:32-07:00
Commit Message:
BAGEL: MINIGAMES: Fix PDQ Coverity warnings
Changed paths:
engines/bagel/hodjnpodj/pdq/main.cpp
engines/bagel/hodjnpodj/pdq/usercfg.h
diff --git a/engines/bagel/hodjnpodj/pdq/main.cpp b/engines/bagel/hodjnpodj/pdq/main.cpp
index 4e1b033cb99..5ac4d0f7d63 100644
--- a/engines/bagel/hodjnpodj/pdq/main.cpp
+++ b/engines/bagel/hodjnpodj/pdq/main.cpp
@@ -797,9 +797,8 @@ void CMainWindow::OnLButtonDown(unsigned int nFlags, CPoint point) {
CSound::handleMessages();
Sleep(BIRD_SLEEP);
}
- if (pSprite != nullptr)
- delete pSprite;
+ delete pSprite;
ReleaseDC(pDC);
} else if (horse1Rect.PtInRect(point)) {
diff --git a/engines/bagel/hodjnpodj/pdq/usercfg.h b/engines/bagel/hodjnpodj/pdq/usercfg.h
index 45bc70db7b8..6d9754e1734 100644
--- a/engines/bagel/hodjnpodj/pdq/usercfg.h
+++ b/engines/bagel/hodjnpodj/pdq/usercfg.h
@@ -60,18 +60,18 @@ protected:
void OnDestroy();
DECLARE_MESSAGE_MAP()
- CScrollBar *m_pSpeedScroll;
- CScrollBar *m_pShownScroll;
- CCheckButton *m_pNamesButton;
+ CScrollBar *m_pSpeedScroll = nullptr;
+ CScrollBar *m_pShownScroll = nullptr;
+ CCheckButton *m_pNamesButton = nullptr;
/*
- * user preference data
- */
- unsigned int m_nShown; // initial number of letters to be revealed
- unsigned int m_nGameSpeed; // game speed 1..5 (1 = fast, 5 = slow)
- bool m_bRandomLetters; // true if letters to be revealed in random order
- bool m_bShowNames; // true if we shouldm show category names
- bool m_bShouldSave; // true if we should save theses values
+ * user preference data
+ */
+ unsigned int m_nShown = 0; // initial number of letters to be revealed
+ unsigned int m_nGameSpeed = 0; // game speed 1..5 (1 = fast, 5 = slow)
+ bool m_bRandomLetters = false; // true if letters to be revealed in random order
+ bool m_bShowNames = false; // true if we should show category names
+ bool m_bShouldSave = false; // true if we should save theses values
};
} // namespace PDQ
Commit: 5742e077aafedc760a6556fde9df2b4823b3338a
https://github.com/scummvm/scummvm/commit/5742e077aafedc760a6556fde9df2b4823b3338a
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2025-10-01T04:24:45-07:00
Commit Message:
BAGEL: MINIGAMES: Fix Peggle Coverity warnings
Changed paths:
engines/bagel/hodjnpodj/peggle/game.cpp
engines/bagel/hodjnpodj/peggle/options.h
diff --git a/engines/bagel/hodjnpodj/peggle/game.cpp b/engines/bagel/hodjnpodj/peggle/game.cpp
index f2fdb443cf8..70397ce9b13 100644
--- a/engines/bagel/hodjnpodj/peggle/game.cpp
+++ b/engines/bagel/hodjnpodj/peggle/game.cpp
@@ -737,10 +737,10 @@ void CMainWindow::OnLButtonDown(unsigned int nFlags, CPoint myPoint) {
(*pSprite).PaintSprite(pDC, STOOL_X, STOOL_Y);
Sleep(STOOL_SLEEP);
}
- if (pSprite != nullptr)
- delete pSprite;
+ delete pSprite;
ReleaseDC(pDC);
+
} else if (oarRect.PtInRect(myPoint) && (*pGameInfo).bSoundEffectsEnabled) {
CSound::waitWaveSounds();
sndPlaySound(nullptr, 0);
diff --git a/engines/bagel/hodjnpodj/peggle/options.h b/engines/bagel/hodjnpodj/peggle/options.h
index d8f5e70b399..ed85e53a935 100644
--- a/engines/bagel/hodjnpodj/peggle/options.h
+++ b/engines/bagel/hodjnpodj/peggle/options.h
@@ -38,9 +38,9 @@ public:
void ClearDialogImage();
void RefreshBackground();
- int m_iDlgId ; // dialog id
- CWnd *m_pDlgParentWnd;
- CBitmap *m_pDlgBackground;
+ int m_iDlgId = 0; // dialog id
+ CWnd *m_pDlgParentWnd = nullptr;
+ CBitmap *m_pDlgBackground = nullptr;
private:
CRect OptionsRect, OkayRect;
More information about the Scummvm-git-logs
mailing list