r20161 - gnucash/trunk/src - Fix printf conversion specifier of 64 bit integers in message.

Christian Stimming cstim at code.gnucash.org
Mon Jan 24 09:02:39 EST 2011


Author: cstim
Date: 2011-01-24 09:02:39 -0500 (Mon, 24 Jan 2011)
New Revision: 20161
Trac: http://svn.gnucash.org/trac/changeset/20161

Modified:
   gnucash/trunk/src/backend/dbi/gnc-backend-dbi.c
   gnucash/trunk/src/gnome-utils/gnc-file.c
Log:
Fix printf conversion specifier of 64 bit integers in message.

(Also, fix compiler warning about && and ||).

Modified: gnucash/trunk/src/backend/dbi/gnc-backend-dbi.c
===================================================================
--- gnucash/trunk/src/backend/dbi/gnc-backend-dbi.c	2011-01-24 09:45:09 UTC (rev 20160)
+++ gnucash/trunk/src/backend/dbi/gnc-backend-dbi.c	2011-01-24 14:02:39 UTC (rev 20161)
@@ -2895,13 +2895,13 @@
     }
     if ( testlonglong != resultlonglong )
     {
-	PWARN( "Test_DBI_Library: LongLong Failed %lld != %lld",
+	PWARN( "Test_DBI_Library: LongLong Failed %" G_GINT64_FORMAT " != % " G_GINT64_FORMAT,
 	       testlonglong, resultlonglong );
 	retval = FALSE;
     }
     if ( testulonglong != resultulonglong )
     {
-	PWARN( "Test_DBI_Library: Unsigned longlong Failed %llu != %llu",
+	PWARN( "Test_DBI_Library: Unsigned longlong Failed %" G_GUINT64_FORMAT " != %" G_GUINT64_FORMAT,
 	       testulonglong, resultulonglong );
 	retval = FALSE;
     }

Modified: gnucash/trunk/src/gnome-utils/gnc-file.c
===================================================================
--- gnucash/trunk/src/gnome-utils/gnc-file.c	2011-01-24 09:45:09 UTC (rev 20160)
+++ gnucash/trunk/src/gnome-utils/gnc-file.c	2011-01-24 14:02:39 UTC (rev 20161)
@@ -827,8 +827,8 @@
 	 * want it to) be updated or it's too new. Mark it as
 	 * read-only
 	 */
-	if (uh_oh &&  io_err == ERR_SQL_DB_TOO_OLD ||
-	    io_err == ERR_SQL_DB_TOO_NEW)
+	if (uh_oh && (io_err == ERR_SQL_DB_TOO_OLD ||
+                      io_err == ERR_SQL_DB_TOO_NEW))
 	{
 	    qof_book_mark_readonly(qof_session_get_book(new_session));
 	    uh_oh = FALSE;



More information about the gnucash-changes mailing list