Skip to content

Commit

Permalink
Warning fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Gerhard Stein committed Jan 19, 2025
1 parent 5dd21f4 commit 0318987
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 13 deletions.
2 changes: 1 addition & 1 deletion src/dbwrapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ wxSharedPtr<wxSQLite3Database> mmDBWrapper::Open(const wxString &dbpath, const w
db->ExecuteQuery("select * from INFOTABLE_V1;");
}
}
catch (const wxSQLite3Exception)
catch (const wxSQLite3Exception&)
{

// Check if database is encrypted with legacy AES128 cipher used prior to 1.8.1
Expand Down
1 change: 0 additions & 1 deletion src/mmex.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
#include "model/Model_Setting.h"
#include "model/Model_Usage.h"

#include "../resources/money.xpm"
#include <wx/cmdline.h>
#include <wx/display.h>
#include <wx/fs_arc.h>
Expand Down
8 changes: 4 additions & 4 deletions src/mmframe.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -817,7 +817,7 @@ void mmGUIFrame::DoRecreateNavTreeControl(bool home_page)
root, "Dashboard", img::HOUSE_PNG,
mmTreeItemData::HOME_PAGE
);

/*
wxTreeItemId alltransactions = addNavTreeSection(
root, "All Transactions", img::ALLTRANSACTIONS_PNG,
mmTreeItemData::CHECKING, -1
Expand All @@ -827,7 +827,7 @@ void mmGUIFrame::DoRecreateNavTreeControl(bool home_page)
root, "Scheduled Transactions", img::SCHEDULE_PNG,
mmTreeItemData::BILLS
);

*/
wxTreeItemId favorites = addNavTreeSection(
root, "Favorites", img::FAVOURITE_PNG,
mmTreeItemData::CHECKING, -3
Expand Down Expand Up @@ -894,12 +894,12 @@ void mmGUIFrame::DoRecreateNavTreeControl(bool home_page)
root, "Deleted Transactions", img::TRASH_PNG,
mmTreeItemData::CHECKING, -2
);

/*
wxTreeItemId help = addNavTreeSection(
root, "Help", img::HELP_PNG,
mmTreeItemData::HELP_PAGE_MAIN
);

*/
///////////////////////////////////////////////////////////////////

bool hideShareAccounts = Option::instance().HideShareAccounts();
Expand Down
10 changes: 5 additions & 5 deletions src/splittransactionsdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ void mmSplitTransactionDialog::CreateControls()
void mmSplitTransactionDialog::FillControls(const int focusRow)
{
DoWindowsFreezeThaw(this);
for (int row = (focusRow == -1 ? 0 : focusRow); row < m_splits_widgets.size(); row++)
for (int row = (focusRow == -1 ? 0 : focusRow); row < static_cast<int>(m_splits_widgets.size()); row++)
{
if (row < static_cast<int>(m_splits.size()))
{
Expand Down Expand Up @@ -380,7 +380,7 @@ void mmSplitTransactionDialog::activateNewRow()
if (row_num_ < (static_cast<int>(m_splits_widgets.size()) - 1))
{
int row = row_num_ + 1;
if (row >= m_splits.size())
if (row >= static_cast<int>(m_splits.size()))
{
Split s = { -1, 0, {}, "" };
m_splits.push_back(s);
Expand All @@ -400,7 +400,7 @@ void mmSplitTransactionDialog::activateNewRow()

void mmSplitTransactionDialog::OnOk( wxCommandEvent& /*event*/ )
{
for (int id=0; id<m_splits.size(); id++)
for (int id=0; id<static_cast<int>(m_splits.size()); id++)
if (!mmDoCheckRow(id))
return;

Expand All @@ -427,7 +427,7 @@ void mmSplitTransactionDialog::OnOk( wxCommandEvent& /*event*/ )

void mmSplitTransactionDialog::OnAddRow(wxCommandEvent& event)
{
for (int id = 0; id < m_splits.size(); id++) {
for (int id = 0; id < static_cast<int>(m_splits.size()); id++) {
if (!mmDoCheckRow(id))
return;
}
Expand Down Expand Up @@ -539,7 +539,7 @@ void mmSplitTransactionDialog::OnComboKey(wxKeyEvent& event)
void mmSplitTransactionDialog::UpdateSplitTotal()
{
double total = 0;
for (int i=0; i<m_splits.size(); i++)
for (int i=0; i<static_cast<int>(m_splits.size()); i++)
{
double amount = 0.0;
if (m_splits_widgets.at(i).amount->GetDouble(amount))
Expand Down
2 changes: 1 addition & 1 deletion src/util.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1959,7 +1959,7 @@ mmHtmlWindow::mmHtmlWindow( wxWindow *parent, wxWindowID id, const wxPoint &pos,
this->Bind(wxEVT_MENU, &mmHtmlWindow::OnMenuSelected, this);
}

void mmHtmlWindow::OnMouseRightClick(wxMouseEvent& event)
void mmHtmlWindow::OnMouseRightClick(wxMouseEvent& /*event*/)
{
wxMenu menu;
menu.Append(wxID_HIGHEST + 1, _("Copy all text to clipboard"));
Expand Down
2 changes: 1 addition & 1 deletion src/util.h
Original file line number Diff line number Diff line change
Expand Up @@ -303,6 +303,6 @@ class mmHtmlWindow : public wxHtmlWindow
, long style=wxHW_DEFAULT_STYLE
, const wxString &name="htmlWindow");
private:
void OnMouseRightClick(wxMouseEvent& event);
void OnMouseRightClick(wxMouseEvent&);
void OnMenuSelected(wxCommandEvent& event);
};

0 comments on commit 0318987

Please sign in to comment.