gnucash master: Multiple changes pushed

John Ralls jralls at code.gnucash.org
Tue Oct 27 20:29:04 EDT 2015


Updated	 via  https://github.com/Gnucash/gnucash/commit/ac34d316 (commit)
	 via  https://github.com/Gnucash/gnucash/commit/ce838d3c (commit)
	 via  https://github.com/Gnucash/gnucash/commit/f3de156e (commit)
	from  https://github.com/Gnucash/gnucash/commit/5537a7ed (commit)



commit ac34d316a5c0e6414157d2c7bcf90988ea5ca7b4
Merge: 5537a7e ce838d3
Author: John Ralls <jralls at ceridwen.us>
Date:   Tue Oct 27 17:28:45 2015 -0700

    Merge branch 'maint'

diff --cc configure.ac
index 86a9a05,ffc011c..48ab828
--- a/configure.ac
+++ b/configure.ac
@@@ -1294,12 -1028,8 +1294,12 @@@ the
    then
      enable_compile_warnings="yes"
    fi
 +#Save CFLAGS so that we can put the warnings in AM_CFLAGS
 +  __cflags="$CFLAGS"
 +  CFLAGS=
-   GNOME_COMPILE_WARNINGS
+   COMPILE_WARNINGS
 -
 +  AM_CFLAGS="$CFLAGS"
 +  CFLAGS="$__cflags"
  
    PKG_CHECK_MODULES(GTK, gtk+-2.0 >= 2.24.0)
    AS_SCRUB_INCLUDE(GTK_CFLAGS)
@@@ -1435,10 -1168,9 +1435,10 @@@
  
    GNOME=1
    AC_DEFINE(GNOME,,using GNOME)
 +  AM_CXXFLAGS="${AM_CXXFLAGS} -Wall"
  
  else
-   # GNOME_COMPILE_WARNINGS will add -Wall; no need to set it again.
+   # COMPILE_WARNINGS will add -Wall; no need to set it again.
    # also, only add it for GCC.
    if test ${GCC}x = yesx
    then
@@@ -1552,22 -1295,14 +1552,24 @@@ AC_ARG_ENABLE(python-bindings
  ### Additional compiler warnings (or not) if we're running GCC
  ###-------------------------------------------------------------------------
  
- # This has to come after AC_PROG_CC _AND_ GNOME_COMPILE_WARNINGS
++
+ # This has to come after AC_PROG_CC _AND_ COMPILE_WARNINGS
 +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])
 +AC_LANG([C])
++
  AC_MSG_CHECKING(what extra warning flags to pass to the C compiler)
  if test ${GCC}x = yesx
  then
    warnFLAGS=
 -  CFLAGS="${CFLAGS} -Wno-unused"
 +  warnXXFLAGS=
 +  #We have a lot of unused variables. Don't warn until someone gets
 +  #around to cleaning them up.
 +  AM_CFLAGS="${AM_CFLAGS} -Wno-unused"
    # other flags...
-   # These next two are included in the GNOME_COMPILE_WARNINGS
+   # These next two are included in the COMPILE_WARNINGS
    #warnFLAGS="${warnFLAGS} -Wmissing-prototypes"
    #warnFLAGS="${warnFLAGS} -Wmissing-declarations"
    #warnFLAGS="${warnFLAGS} -Werror-implicit-function-declaration" # In -Wall

commit ce838d3cfcecaf43a73cfbdc1e59c9e07941695d
Author: John Ralls <jralls at ceridwen.us>
Date:   Tue Oct 27 17:25:48 2015 -0700

    Rename GNOME_COMPILE_WARNINGS to just COMPILE_WARNINGS.
    
    Poaching someone else's macro name is a really dumb idea, because aclocal
    looks in our macros directory only if it can't find the macro in the system
    directories. Our config code doesn't work with Gnome's macro, it exports
    WARN_CFLAGS rather than modifying CFLAGS directly the way ours does.

diff --git a/configure.ac b/configure.ac
index 6534497..ffc011c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1028,7 +1028,8 @@ then
   then
     enable_compile_warnings="yes"
   fi
-  GNOME_COMPILE_WARNINGS
+  COMPILE_WARNINGS
+
 
   PKG_CHECK_MODULES(GTK, gtk+-2.0 >= 2.24.0)
   AS_SCRUB_INCLUDE(GTK_CFLAGS)
@@ -1169,7 +1170,7 @@ then
   AC_DEFINE(GNOME,,using GNOME)
 
 else
-  # GNOME_COMPILE_WARNINGS will add -Wall; no need to set it again.
+  # COMPILE_WARNINGS will add -Wall; no need to set it again.
   # also, only add it for GCC.
   if test ${GCC}x = yesx
   then
@@ -1294,14 +1295,14 @@ AC_ARG_ENABLE(python-bindings,
 ### Additional compiler warnings (or not) if we're running GCC
 ###-------------------------------------------------------------------------
 
-# This has to come after AC_PROG_CC _AND_ GNOME_COMPILE_WARNINGS
+# This has to come after AC_PROG_CC _AND_ COMPILE_WARNINGS
 AC_MSG_CHECKING(what extra warning flags to pass to the C compiler)
 if test ${GCC}x = yesx
 then
   warnFLAGS=
   CFLAGS="${CFLAGS} -Wno-unused"
   # other flags...
-  # These next two are included in the GNOME_COMPILE_WARNINGS
+  # These next two are included in the COMPILE_WARNINGS
   #warnFLAGS="${warnFLAGS} -Wmissing-prototypes"
   #warnFLAGS="${warnFLAGS} -Wmissing-declarations"
   #warnFLAGS="${warnFLAGS} -Werror-implicit-function-declaration" # In -Wall
diff --git a/macros/compiler-flags.m4 b/macros/compiler-flags.m4
index 63f8e2e..ca44c8f 100644
--- a/macros/compiler-flags.m4
+++ b/macros/compiler-flags.m4
@@ -1,8 +1,8 @@
-dnl GNOME_COMPILE_WARNINGS
+dnl COMPILE_WARNINGS
 dnl Turn on many useful compiler warnings
 dnl For now, only works on GCC
-AC_DEFUN([GNOME_COMPILE_WARNINGS],[
-  AC_ARG_ENABLE(compile-warnings, 
+AC_DEFUN([COMPILE_WARNINGS],[
+  AC_ARG_ENABLE(compile-warnings,
     [  --enable-compile-warnings=[no/minimum/yes]	Turn on compiler warnings.],,enable_compile_warnings=minimum)
 
   AC_MSG_CHECKING(what warning flags to pass to the C compiler)
@@ -56,8 +56,8 @@ AC_DEFUN([GNOME_COMPILE_WARNINGS],[
 
 dnl For C++, do basically the same thing.
 
-AC_DEFUN([GNOME_CXX_WARNINGS],[
-  AC_ARG_ENABLE(cxx-warnings, 
+AC_DEFUN([CXX_WARNINGS],[
+  AC_ARG_ENABLE(cxx-warnings,
     [  --enable-cxx-warnings=[no/minimum/yes]	Turn on compiler warnings.],,enable_cxx_warnings=minimum)
 
   AC_MSG_CHECKING(what warning flags to pass to the C++ compiler)

commit f3de156e65d04befb2dd08353c01940c186001a7
Author: John Ralls <jralls at ceridwen.us>
Date:   Tue Oct 27 14:08:59 2015 -0700

    Revert "Use gnc_pricedb_has_prices instead of testing the return value of get_prices."
    
    This reverts commit ae35dbb46407762c925346975588cd58fdb60ca3.
    because the return value was actually used later on.

diff --git a/src/gnome/dialog-commodities.c b/src/gnome/dialog-commodities.c
index 3f29a29..1a0e385 100644
--- a/src/gnome/dialog-commodities.c
+++ b/src/gnome/dialog-commodities.c
@@ -164,7 +164,8 @@ remove_clicked (CommoditiesDialog *cd)
     g_list_free (accounts);
 
     pdb = gnc_pricedb_get_db (cd->book);
-    if (gnc_pricedb_has_prices(pdb, commodity, NULL))
+    prices = gnc_pricedb_get_prices(pdb, commodity, NULL);
+    if (prices)
     {
         message = _("This commodity has price quotes. Are "
                     "you sure you want to delete the selected "



Summary of changes:
 configure.ac                   | 10 ++++++----
 macros/compiler-flags.m4       | 10 +++++-----
 src/gnome/dialog-commodities.c |  3 ++-
 3 files changed, 13 insertions(+), 10 deletions(-)



More information about the gnucash-changes mailing list