[M-git] Mahogany sources repository. branch master updated. v0.67-848-g9d1f084e

vadz via Mahogany-cvsupdates <[email protected]> Sat, 02 Nov 2024 14:04:37 +0000
Newsgroups gmane.mail.mahogany.cvs
Message-ID <[email protected]>
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Mahogany sources repository.".

The branch, master has been updated
       via  9d1f084e02fa0258705884adba16c90f59d8e5d6 (commit)
       via  36608f87476e79e75c304ae92f3bba4de4ccfc4c (commit)
      from  2ed4ee7769d64c3f21f738cb0ba1bf57aed032d3 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 9d1f084e02fa0258705884adba16c90f59d8e5d6
Author: Vadim Zeitlin <[email protected]>
Date:   Sat Nov 2 15:02:33 2024 +0100

    Remove unused variables, fixing a couple of bugs in the process
    
    Fix all occurrences of -Wunused-variable when using latest wx which
    makes unused wxStrings and a few other classes generate this warning.
    
    In most cases, just remove the variables, but in a couple of them do use
    them instead of the wrong variable that was used before, fixing bugs.

diff --git a/src/adb/AdbFrame.cpp b/src/adb/AdbFrame.cpp
index 19d8d5a2..abd05c9c 100644
--- a/src/adb/AdbFrame.cpp
+++ b/src/adb/AdbFrame.cpp
@@ -1703,7 +1703,7 @@ ask_name:
   }
 
   // prepare strings for diagnostic messages
-  wxString strWhere, strGroup = group->GetWhere();
+  wxString strWhere = group->GetWhere();
   wxString strWhat = m_bLastNewWasGroup ? _("group") : _("entry");
 
   // first check that it doesn't already exist
diff --git a/src/adb/ProvBbdb.cpp b/src/adb/ProvBbdb.cpp
index f32227e8..8801de3d 100644
--- a/src/adb/ProvBbdb.cpp
+++ b/src/adb/ProvBbdb.cpp
@@ -474,8 +474,6 @@ BbdbEntry::ReadListOfVectors(String *string)
    StringListListList vlist;
    StringListList     slist;
 
-   String        str;
-
    if(! ReadToken('(', string))
    {
       ReadNil(string);
diff --git a/src/gui/wxFiltersDialog.cpp b/src/gui/wxFiltersDialog.cpp
index 792b4fc0..4d8a7114 100644
--- a/src/gui/wxFiltersDialog.cpp
+++ b/src/gui/wxFiltersDialog.cpp
@@ -2305,7 +2305,6 @@ void wxFolderFiltersDialog::OnAddButton(wxCommandEvent& event)
 {
    if ( event.GetEventObject() == m_btnAdd )
    {
-      wxArrayString allFiltersOld = Profile::GetAllFilters();
       String name = CreateNewFilter(this);
       if ( !name.empty() )
       {
diff --git a/src/gui/wxFolderView.cpp b/src/gui/wxFolderView.cpp
index 2cd7829f..20013982 100644
--- a/src/gui/wxFolderView.cpp
+++ b/src/gui/wxFolderView.cpp
@@ -5254,7 +5254,6 @@ wxFolderView::OnASFolderResultEvent(MEventASFolderResultData &event)
 
       m_TicketList->Remove(t);
 
-      String msg;
       switch ( result->GetOperation() )
       {
          case ASMailFolder::Op_GetMessage:
diff --git a/src/gui/wxIconManager.cpp b/src/gui/wxIconManager.cpp
index b93f8f8b..c8b99462 100644
--- a/src/gui/wxIconManager.cpp
+++ b/src/gui/wxIconManager.cpp
@@ -173,7 +173,6 @@ wxIconManager::LoadImage(String filename, bool *success, bool showDlg)
 #ifdef OS_UNIX
    if(! loaded) // try to use imageMagick to convert image to another format:
    {
-      String oldfilename = filename;
       String tempfile = filename;
       int format = READ_APPCONFIG(MP_TMPGFXFORMAT);
       if((format < 0 || format > NUMBER_OF_FORMATS)
diff --git a/src/gui/wxMDialogs.cpp b/src/gui/wxMDialogs.cpp
index 9a1d0df5..cbc37444 100644
--- a/src/gui/wxMDialogs.cpp
+++ b/src/gui/wxMDialogs.cpp
@@ -577,7 +577,7 @@ MDialog_FatalErrorMessage(const wxString& message,
 {
    String msg = String(message) + _("\nExiting application...");
 
-   MDialog_ErrorMessage(message,parent, wxString(M_TITLE_PREFIX)+title,true);
+   MDialog_ErrorMessage(msg,parent, wxString(M_TITLE_PREFIX)+title,true);
    mApplication->Exit();
 }
 
diff --git a/src/mail/SendMessageCC.cpp b/src/mail/SendMessageCC.cpp
index 4c4eaac2..c223dc99 100644
--- a/src/mail/SendMessageCC.cpp
+++ b/src/mail/SendMessageCC.cpp
@@ -646,8 +646,7 @@ SendMessageCC::InitFromMsg(const Message *message, const wxArrayInt *partsToOmit
 
    // next deal with the remaining headers
    String name,
-          value,
-          nameUpper;
+          value;
    HeaderIterator hdrIter = message->GetHeaderIterator();
    while ( hdrIter.GetNext(&name, &value) )
    {
diff --git a/src/modules/Filters.cpp b/src/modules/Filters.cpp
index 5359007a..dc19adb2 100644
--- a/src/modules/Filters.cpp
+++ b/src/modules/Filters.cpp
@@ -1878,7 +1878,6 @@ static Value func_isspam(ArgList *args, FilterRuleImpl *p)
    if ( !msg )
       return false;
 
-   wxArrayString params;
    if ( args->Count() != 1 )
       return 0;
 
diff --git a/src/modules/NetscapeImporter.cpp b/src/modules/NetscapeImporter.cpp
index f7222100..47b40c7d 100644
--- a/src/modules/NetscapeImporter.cpp
+++ b/src/modules/NetscapeImporter.cpp
@@ -1063,7 +1063,6 @@ bool MNetscapeImporter::ImportSettingsFromFile(const wxString& filename)
   wxStringTokenizer tkz;
   wxString varName;
   wxString value;
-  wxString msg;
   size_t nLines = file.GetLineCount();
 
 
@@ -1243,7 +1242,6 @@ bool MNetscapeImporter::ImportFolderSettings ( MyHashTable& tbl )
    return FALSE;
 
   bool tmpBool = FALSE;
-  wxString lstr;
 
   // pref says not to check for new mail, then set to a very large number
   // otherwise leave it as set.
diff --git a/src/wx/common/vcard.cpp b/src/wx/common/vcard.cpp
index 12b9861f..0c2be159 100644
--- a/src/wx/common/vcard.cpp
+++ b/src/wx/common/vcard.cpp
@@ -238,7 +238,6 @@ bool wxVCardObject::GetValue(unsigned long *val) const
 
 bool wxVCardObject::GetNamedPropValue(const char *name, wxString *val) const
 {
-    wxString value;
     wxVCardObject *vcObj = GetProperty(wxConvertMB2WX(name));
     if ( vcObj )
     {

commit 36608f87476e79e75c304ae92f3bba4de4ccfc4c
Author: Vadim Zeitlin <[email protected]>
Date:   Sun Dec 10 00:44:55 2023 +0100

    Fix check for conversion failure when sending messages
    
    Fix wrong check added in 466ad2c0 (Fix wrong encoding conversion code in
    composer code, 2023-08-23) which could result in an empty message being
    sent if the conversion to the original encoding failed, instead of
    converting the message to the correct encoding (e.g. UTF-8) as wanted.

diff --git a/src/gui/wxComposeView.cpp b/src/gui/wxComposeView.cpp
index 817c8be6..27beb3da 100644
--- a/src/gui/wxComposeView.cpp
+++ b/src/gui/wxComposeView.cpp
@@ -4812,7 +4812,7 @@ wxComposeView::EncodeText(const wxString& text,
    {
       // try converting this part to the message encoding
       textBuf = text.mb_str(wxCSConv(m_encoding));
-      if ( !textBuf )
+      if ( !textBuf.length() )
       {
          // Before asking whether to convert to the part encoding, check if it
          // can be converted.

-----------------------------------------------------------------------

Summary of changes:
 src/adb/AdbFrame.cpp             | 2 +-
 src/adb/ProvBbdb.cpp             | 2 --
 src/gui/wxComposeView.cpp        | 2 +-
 src/gui/wxFiltersDialog.cpp      | 1 -
 src/gui/wxFolderView.cpp         | 1 -
 src/gui/wxIconManager.cpp        | 1 -
 src/gui/wxMDialogs.cpp           | 2 +-
 src/mail/SendMessageCC.cpp       | 3 +--
 src/modules/Filters.cpp          | 1 -
 src/modules/NetscapeImporter.cpp | 2 --
 src/wx/common/vcard.cpp          | 1 -
 11 files changed, 4 insertions(+), 14 deletions(-)


hooks/post-receive
-- 
Mahogany sources repository.