gnucash master: Multiple changes pushed

John Ralls jralls at code.gnucash.org
Sun Jan 22 13:56:03 EST 2023


Updated	 via  https://github.com/Gnucash/gnucash/commit/432f2d4b (commit)
	 via  https://github.com/Gnucash/gnucash/commit/9a1a90d8 (commit)
	 via  https://github.com/Gnucash/gnucash/commit/ae6efa39 (commit)
	 via  https://github.com/Gnucash/gnucash/commit/2a119375 (commit)
	 via  https://github.com/Gnucash/gnucash/commit/f3cc223f (commit)
	 via  https://github.com/Gnucash/gnucash/commit/8044f79f (commit)
	from  https://github.com/Gnucash/gnucash/commit/d039e65a (commit)



commit 432f2d4bb891312ee8a4b91df7c6abac5abe2482
Merge: 9a1a90d8d 8044f79f7
Author: John Ralls <jralls at ceridwen.us>
Date:   Sun Jan 22 10:50:11 2023 -0800

    Merge Richard Cohen's suppress-boost-warning into master.


commit 9a1a90d8d0fa636945e44f2d525ef859b6c1eb24
Merge: d039e65ac ae6efa39c
Author: John Ralls <jralls at ceridwen.us>
Date:   Sun Jan 22 10:49:29 2023 -0800

    Merge branch 'maint'


commit ae6efa39cade4d23b504da7a249d9d8562e76dc1
Merge: 2d66631fe 2a119375c
Author: John Ralls <jralls at ceridwen.us>
Date:   Sun Jan 22 10:41:02 2023 -0800

    Merge 2 simple PRs from Richard Cohen into maint.


commit 2a119375c304154ccf38b21fae91bccc4d16eed6
Author: richardcohen <123320031+richardcohen at users.noreply.github.com>
Date:   Sun Jan 22 18:03:02 2023 +0000

    Avoid touching the global errno

diff --git a/gnucash/gnome/dialog-sx-from-trans.c b/gnucash/gnome/dialog-sx-from-trans.c
index 1f9f9f2c8..4e3c68d1c 100644
--- a/gnucash/gnome/dialog-sx-from-trans.c
+++ b/gnucash/gnome/dialog-sx-from-trans.c
@@ -756,9 +756,7 @@ sxftd_update_excal_adapt( GObject *o, gpointer ud )
 void
 gnc_sx_create_from_trans( GtkWindow *parent, Transaction *trans )
 {
-#ifndef __MINGW32__
-    int errno;
-#endif
+    int sx_error;
     SXFromTransInfo *sxfti = g_new0( SXFromTransInfo, 1);
     GtkBuilder *builder;
     GtkWidget *dialog;
@@ -782,9 +780,9 @@ gnc_sx_create_from_trans( GtkWindow *parent, Transaction *trans )
 
     sxfti->sx = xaccSchedXactionMalloc(gnc_get_current_book ());
 
-    if ( (errno = sxftd_init( sxfti )) < 0 )
+    if ( (sx_error = sxftd_init( sxfti )) < 0 )
     {
-        if ( errno == SXFTD_ERRNO_OPEN_XACTION )
+        if ( sx_error == SXFTD_ERRNO_OPEN_XACTION )
         {
             gnc_error_dialog (NULL, "%s",
                               _( "Cannot create a Scheduled Transaction "
@@ -796,7 +794,7 @@ gnc_sx_create_from_trans( GtkWindow *parent, Transaction *trans )
         }
         else
         {
-            g_error("sxftd_init: %d", errno);
+            g_error("sxftd_init: %d", sx_error);
         }
     }
 

commit f3cc223f5fd5a3974f87e9ad0c0e18dabc12fc61
Author: richardcohen <123320031+richardcohen at users.noreply.github.com>
Date:   Sun Jan 22 17:54:40 2023 +0000

    Fix some bad code formatting

diff --git a/libgnucash/engine/gnc-date.cpp b/libgnucash/engine/gnc-date.cpp
index 06916b14f..6fa04e605 100644
--- a/libgnucash/engine/gnc-date.cpp
+++ b/libgnucash/engine/gnc-date.cpp
@@ -1234,8 +1234,9 @@ GDate* gnc_g_date_new_today ()
     auto result = g_date_new_dmy (ymd.day, month, ymd.year);
     g_assert(g_date_valid (result));
     return result;
-}void
+}
 
+void
 gnc_gdate_set_today (GDate* gd)
 {
     GDate *today = gnc_g_date_new_today ();

commit 8044f79f757bf230a06b42302fb610f810221069
Author: richardcohen <123320031+richardcohen at users.noreply.github.com>
Date:   Sun Jan 22 17:50:34 2023 +0000

    Silence the boost (<1.76) warning message
    
    from .../gnucash-4.8/libgnucash/app-utils/gnc-quotes.cpp:33:
    /usr/include/boost/bind.hpp:36:1: note: ‘#pragma message:
    
        The practice of declaring the Bind placeholders (_1, _2, ...) in the
        global namespace is deprecated.
        Please use <boost/bind/bind.hpp> + using namespace boost::placeholders,
        or define BOOST_BIND_GLOBAL_PLACEHOLDERS to retain the current behavior.’
    
    The issue was fixed in boost 1.76, but, e.g ubuntu 22.04 has boost 1.74

diff --git a/libgnucash/app-utils/gnc-quotes.cpp b/libgnucash/app-utils/gnc-quotes.cpp
index 366c9fe9a..0f71f20ad 100644
--- a/libgnucash/app-utils/gnc-quotes.cpp
+++ b/libgnucash/app-utils/gnc-quotes.cpp
@@ -27,6 +27,11 @@
 #include <vector>
 #include <string>
 #include <iostream>
+#include <boost/version.hpp>
+#if BOOST_VERSION < 107600
+// json_parser uses a deprecated version of bind.hpp
+#define BOOST_BIND_GLOBAL_PLACEHOLDERS
+#endif
 #include <boost/algorithm/string.hpp>
 #include <boost/filesystem.hpp>
 #include <boost/process.hpp>



Summary of changes:
 gnucash/gnome/dialog-sx-from-trans.c | 10 ++++------
 libgnucash/app-utils/gnc-quotes.cpp  |  5 +++++
 libgnucash/engine/gnc-date.cpp       |  3 ++-
 3 files changed, 11 insertions(+), 7 deletions(-)



More information about the gnucash-changes mailing list