gnucash stable: Multiple changes pushed
John Ralls
jralls at code.gnucash.org
Wed May 17 22:18:32 EDT 2023
Updated via https://github.com/Gnucash/gnucash/commit/26162da4 (commit)
via https://github.com/Gnucash/gnucash/commit/3c34a617 (commit)
via https://github.com/Gnucash/gnucash/commit/1f43bbc7 (commit)
via https://github.com/Gnucash/gnucash/commit/80e9d9c3 (commit)
via https://github.com/Gnucash/gnucash/commit/7f1ce2b5 (commit)
from https://github.com/Gnucash/gnucash/commit/acd26202 (commit)
commit 26162da4509751c4741d8e56008b34571f491347
Merge: acd2620278 3c34a61776
Author: John Ralls <jralls at ceridwen.us>
Date: Wed May 17 21:16:09 2023 -0500
Merge Richard Cohen's 'cleanup-build' into stable.
commit 3c34a617762f82dfd32bd6b56218fef231f0206e
Author: Richard Cohen <richard at daijobu.co.uk>
Date: Wed Mar 29 10:08:37 2023 +0100
Remove #pragma ... "-Wformat-nonliteral"
Seems to have been accidentally left behind when time64_to_string()
was (re)moved
diff --git a/libgnucash/backend/sql/gnc-sql-backend.cpp b/libgnucash/backend/sql/gnc-sql-backend.cpp
index cee7d5cdd0..283f31234b 100644
--- a/libgnucash/backend/sql/gnc-sql-backend.cpp
+++ b/libgnucash/backend/sql/gnc-sql-backend.cpp
@@ -455,8 +455,6 @@ GncSqlBackend::write_schedXactions()
return is_ok;
}
-#pragma GCC diagnostic warning "-Wformat-nonliteral"
-
void
GncSqlBackend::sync(QofBook* book)
{
commit 1f43bbc798dfb0318bc3bc6e6582583e454a95c0
Author: Richard Cohen <richard at daijobu.co.uk>
Date: Thu Mar 23 09:51:07 2023 +0000
Remove #pragma ..."-Wstrict-aliasing"
G_LOCK was fixed in glib 2.19.8
See https://bugzilla.gnome.org/show_bug.cgi?id=316221
diff --git a/gnucash/gnome-utils/print-session.c b/gnucash/gnome-utils/print-session.c
index ba06b99678..5932f6af21 100644
--- a/gnucash/gnome-utils/print-session.c
+++ b/gnucash/gnome-utils/print-session.c
@@ -29,14 +29,6 @@
#undef G_LOG_DOMAIN
#define G_LOG_DOMAIN "gnc.printing"
-/* Do not treat -Wstrict-aliasing warnings as errors because of problems of the
- * G_LOCK* macros as declared by glib. See
- * https://bugs.gnucash.org/show_bug.cgi?id=316221 for additional information.
- */
-#if (__GNUC__ >= 4 && __GNUC_MINOR__ >= 2)
-# pragma GCC diagnostic warning "-Wstrict-aliasing"
-#endif
-
static GtkPrintSettings *print_settings = NULL;
static GtkPageSetup *page_setup = NULL;
G_LOCK_DEFINE_STATIC(print_settings);
diff --git a/libgnucash/backend/xml/io-gncxml-v2.cpp b/libgnucash/backend/xml/io-gncxml-v2.cpp
index 2b37b4b1a4..48e83ec5d0 100644
--- a/libgnucash/backend/xml/io-gncxml-v2.cpp
+++ b/libgnucash/backend/xml/io-gncxml-v2.cpp
@@ -73,14 +73,6 @@
#include "io-gncxml-v2.h"
#include "io-gncxml-gen.h"
-/* Do not treat -Wstrict-aliasing warnings as errors because of problems of the
- * G_LOCK* macros as declared by glib. See
- * https://bugs.gnucash.org/show_bug.cgi?id=316221 for additional information.
- */
-#if (__GNUC__ >= 4 && __GNUC_MINOR__ >= 2)
-# pragma GCC diagnostic warning "-Wstrict-aliasing"
-#endif
-
static QofLogModule log_module = GNC_MOD_IO;
typedef struct
commit 80e9d9c35d7538c9179b542d706aea8c84a5d9e8
Author: Richard Cohen <richard at daijobu.co.uk>
Date: Thu Mar 2 12:32:44 2023 +0000
scanf supports %lld since C++11, C99
diff --git a/CMakeLists.txt b/CMakeLists.txt
index a819a61b5a..0b301da77d 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -692,14 +692,6 @@ install(FILES ${gnucash_DOCS} DESTINATION ${CMAKE_INSTALL_DOCDIR})
# Create config.h
-if (WIN32)
- if (MINGW)
- set (HAVE_SCANF_LLD 1)
- else ()
- set (HAVE_SCANF_I64D 1)
- endif()
-endif()
-
check_include_files (dirent.h HAVE_DIRENT_H)
check_include_files (dlfcn.h HAVE_DLFCN_H)
check_include_files (glob.h HAVE_GLOB_H)
@@ -764,7 +756,6 @@ set (HAVE_LINK 1)
set (HAVE_LOCALTIME_R 1)
set (HAVE_PTHREAD_MUTEX_INIT 1)
set (HAVE_PTHREAD_PRIO_INHERIT 1)
-set (HAVE_SCANF_LLD 1)
set (HAVE_SETENV 1)
set (HAVE_STPCPY 1)
set (HAVE_STRPTIME 1)
diff --git a/common/config.h.cmake.in b/common/config.h.cmake.in
index 5f70f809c6..c1dbec0866 100644
--- a/common/config.h.cmake.in
+++ b/common/config.h.cmake.in
@@ -153,15 +153,6 @@
/* If available, contains the Python version number currently in use. */
#cmakedefine HAVE_PYTHON 1
-/* Define if scanf supports %I64d conversions. */
-#cmakedefine HAVE_SCANF_I64D 1
-
-/* Define if scanf supports %lld conversions. */
-#cmakedefine HAVE_SCANF_LLD 1
-
-/* Define if scanf supports %qd conversions. */
-#cmakedefine HAVE_SCANF_QD 1
-
/* Define to 1 if you have the `setenv' function. */
#cmakedefine HAVE_SETENV 1
diff --git a/libgnucash/app-utils/gnc-ui-util.c b/libgnucash/app-utils/gnc-ui-util.c
index a8de2e4084..025b9b6e21 100644
--- a/libgnucash/app-utils/gnc-ui-util.c
+++ b/libgnucash/app-utils/gnc-ui-util.c
@@ -1935,7 +1935,7 @@ xaccParseAmountInternal (const char * in_str, gboolean monetary,
{
*out = '\0';
- if (*out_str && sscanf(out_str, QOF_SCANF_LLD, &numer) < 1)
+ if (*out_str && sscanf(out_str, "%lld", &numer) < 1)
next_state = NO_NUM_ST;
else if (next_state == FRAC_ST)
{
@@ -1977,7 +1977,7 @@ xaccParseAmountInternal (const char * in_str, gboolean monetary,
}
long long int fraction;
- if (sscanf (out_str, QOF_SCANF_LLD, &fraction) < 1)
+ if (sscanf (out_str, "%lld", &fraction) < 1)
{
g_free(out_str);
return FALSE;
diff --git a/libgnucash/backend/xml/sixtp-utils.cpp b/libgnucash/backend/xml/sixtp-utils.cpp
index 3da4b1f121..0cf032b6ca 100644
--- a/libgnucash/backend/xml/sixtp-utils.cpp
+++ b/libgnucash/backend/xml/sixtp-utils.cpp
@@ -171,7 +171,7 @@ string_to_gint64 (const gchar* str, gint64* v)
g_return_val_if_fail (str, FALSE);
/* must use "<" here because %n's effects aren't well defined */
- if (sscanf (str, " " QOF_SCANF_LLD "%n", &v_in, &num_read) < 1)
+ if (sscanf (str, " %lld%n", &v_in, &num_read) < 1)
{
return (FALSE);
}
diff --git a/libgnucash/engine/qofutil.h b/libgnucash/engine/qofutil.h
index ddbd39d2f0..579650e63f 100644
--- a/libgnucash/engine/qofutil.h
+++ b/libgnucash/engine/qofutil.h
@@ -45,21 +45,6 @@ extern "C"
{
#endif
-/** Do not use these for printf, only scanf */
-#if HAVE_SCANF_LLD
-# define QOF_SCANF_LLD "%lld"
-#else
-# if HAVE_SCANF_QD
-# define QOF_SCANF_LLD "%qd"
-# else
-# if HAVE_SCANF_I64D
-# define QOF_SCANF_LLD "%I64d"
-# else
-# error "No scanf format string is known for LLD. Fix your ./configure so that the correct one is detected!"
-# endif
-# endif
-#endif
-
#define QOF_MOD_UTIL "qof.utilities"
/** \name typedef enum as string macros
commit 7f1ce2b5e5298e35bdc0663be8a6f8d21b2fd714
Author: Richard Cohen <richard at daijobu.co.uk>
Date: Fri Mar 24 14:08:52 2023 +0000
Remove references to cutecash
diff --git a/common/config.h.cmake.in b/common/config.h.cmake.in
index f00b3309d1..5f70f809c6 100644
--- a/common/config.h.cmake.in
+++ b/common/config.h.cmake.in
@@ -334,8 +334,3 @@
#cmakedefine WEBKIT2 1
#cmakedefine WEBKIT1 1
-/* Definitions for all OS */
-/* From cutecash */
-//#define HAVE_LIBQOF /**/
-//#define QOF_DISABLE_DEPRECATED 1
-//#define GNC_NO_LOADABLE_MODULES 1
diff --git a/gnucash/import-export/aqb/test/CMakeLists.txt b/gnucash/import-export/aqb/test/CMakeLists.txt
index 2d12ddb29d..a5e7b81b6e 100644
--- a/gnucash/import-export/aqb/test/CMakeLists.txt
+++ b/gnucash/import-export/aqb/test/CMakeLists.txt
@@ -20,7 +20,7 @@ set(test_aqb_INCLUDE_DIRS
set(test_aqb_LIBS
gncmod-aqbanking gnc-generic-import gnc-gnome gnc-gnome-utils
gnc-ledger-core gnc-app-utils
- gncmod-backend-xml-utils gnc-engine gnc-core-utils gnc-module
+ gnc-backend-xml-utils gnc-engine gnc-core-utils gnc-module
)
set_dist_list(test_aqb_DIST ${test_aqb_SOURCES} file-book.gnucash
diff --git a/libgnucash/backend/xml/CMakeLists.txt b/libgnucash/backend/xml/CMakeLists.txt
index 7da658f1b2..dbd6a25fa8 100644
--- a/libgnucash/backend/xml/CMakeLists.txt
+++ b/libgnucash/backend/xml/CMakeLists.txt
@@ -125,9 +125,3 @@ install(TARGETS gncmod-backend-xml
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
# ----
-
-# Special normal (non-MODULE) library for cutecash only
-add_library(gncmod-backend-xml-utils ${libgncmod_backend_xml_SOURCES})
-target_link_libraries(gncmod-backend-xml-utils gnc-backend-xml-utils gnc-engine
- gnc-core-utils ${LIBXML2_LDFLAGS} PkgConfig::GLIB2 ${ZLIB_LIBRARY})
-target_compile_definitions (gncmod-backend-xml-utils PRIVATE -DG_LOG_DOMAIN=\"gnc.backend.xml\" -DU_SHOW_CPLUSPLUS_API=0)
Summary of changes:
CMakeLists.txt | 9 ---------
common/config.h.cmake.in | 14 --------------
gnucash/gnome-utils/print-session.c | 8 --------
gnucash/import-export/aqb/test/CMakeLists.txt | 2 +-
libgnucash/app-utils/gnc-ui-util.c | 4 ++--
libgnucash/backend/sql/gnc-sql-backend.cpp | 2 --
libgnucash/backend/xml/CMakeLists.txt | 6 ------
libgnucash/backend/xml/io-gncxml-v2.cpp | 8 --------
libgnucash/backend/xml/sixtp-utils.cpp | 2 +-
libgnucash/engine/qofutil.h | 15 ---------------
10 files changed, 4 insertions(+), 66 deletions(-)
More information about the gnucash-changes
mailing list