gnucash master: Multiple changes pushed

John Ralls jralls at code.gnucash.org
Tue Dec 1 19:42:15 EST 2015


Updated	 via  https://github.com/Gnucash/gnucash/commit/b3cfef70 (commit)
	 via  https://github.com/Gnucash/gnucash/commit/29138bc7 (commit)
	from  https://github.com/Gnucash/gnucash/commit/039a4336 (commit)



commit b3cfef70842a2248660dbfd08e7b77dd1aa22897
Author: John Ralls <jralls at ceridwen.us>
Date:   Tue Dec 1 16:41:50 2015 -0800

    Cast around unsigned-signed comparison warning.
    
    From glibc when comparing snprintf() return value to a size_t.

diff --git a/src/backend/xml/gnc-backend-xml.cpp b/src/backend/xml/gnc-backend-xml.cpp
index b9b032d..dd0f157 100644
--- a/src/backend/xml/gnc-backend-xml.cpp
+++ b/src/backend/xml/gnc-backend-xml.cpp
@@ -172,7 +172,7 @@ gnc_xml_be_get_file_lock (FileBackend *be)
     strcpy (pathbuf, be->lockfile);
     path = strrchr (pathbuf, '.');
     while (snprintf (path, pathbuf_size - (path - pathbuf), ".%lx.%d.LNK", gethostid(), getpid())
-            >= pathbuf_size - (path - pathbuf))
+	   >= static_cast<int>(pathbuf_size - (path - pathbuf)))
     {
         pathbuf_size += 100;
         tmpbuf = (char *) realloc (pathbuf, pathbuf_size);

commit 29138bc793d42ea79b03670f8445540f97072782
Author: John Ralls <jralls at ceridwen.us>
Date:   Tue Dec 1 16:40:31 2015 -0800

    Silence deprecation warnings.
    
    Required because libdbi-0.9 emits them when using libdbi-0.8 API.

diff --git a/configure.ac b/configure.ac
index 48ab828..23f2883 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1558,6 +1558,9 @@ AC_LANG([C++])
 AX_CHECK_COMPILE_FLAG([-Wno-deprecated-register],
     [AM_CXXFLAGS="${AM_CXXFLAGS} -Wno-unused -Wno-deprecated-register"],
     [AM_CXXFLAGS="${AM_CXXFLAGS} -Wno-unused"], [-Werror])
+AX_CHECK_COMPILE_FLAG([-Wno-deprecated-declarations],
+    [AM_CXXFLAGS="${AM_CXXFLAGS} -Wno-deprecated-declarations"],
+    [AM_CXXFLAGS="${AM_CXXFLAGS}"], [-Werror])
 AC_LANG([C])
 
 AC_MSG_CHECKING(what extra warning flags to pass to the C compiler)



Summary of changes:
 configure.ac                        | 3 +++
 src/backend/xml/gnc-backend-xml.cpp | 2 +-
 2 files changed, 4 insertions(+), 1 deletion(-)



More information about the gnucash-changes mailing list