1.9.2 compilation error on NetBSD-amd64
Thomas Klausner
tk at giga.or.at
Tue Mar 14 03:29:49 EST 2006
On Mon, Mar 13, 2006 at 11:53:53PM -0500, Josh Sled wrote:
> On Mon, 2006-03-13 at 22:22 +0100, Thomas Klausner wrote:
> > gnucash-1.9.2 build error on NetBSD-3.0/x86_64 (amd64):
> > druid-acct-period.c: In function `ap_show_menu':
> > druid-acct-period.c:337: warning: long int format, different type arg (arg 5)
> > druid-acct-period.c: In function `ap_druid_create':
> > druid-acct-period.c:530: warning: long int format, different type arg (arg 5)
> >
> > Please fix! :)
>
> Uh, same to you: please fix! Send in a patch...
Well, I have no amd64 system myself, I only saw this in a bulk build,
but the problem is that time_t on NetBSD/amd64 is an int, and the
format string used is "%ld". The argument should just be cast to (long).
See attached patch.
Cheers,
Thomas
-------------- next part --------------
Index: druid-acct-period.c
===================================================================
--- druid-acct-period.c (revision 13624)
+++ druid-acct-period.c (working copy)
@@ -334,7 +334,7 @@
* we may have closed books since last time. */
info->earliest = get_earliest_in_book (gnc_get_current_book());
info->earliest_str = qof_print_date(info->earliest);
- PINFO ("date of earliest is %ld %s", info->earliest, ctime (&info->earliest));
+ PINFO ("date of earliest is %ld %s", (long)info->earliest, ctime (&info->earliest));
prepare_remarks (info);
}
@@ -528,7 +528,7 @@
info->earliest = get_earliest_in_book (gnc_get_current_book());
info->earliest_str = qof_print_date(info->earliest);
PINFO ("date of earliest transaction is %ld %s",
- info->earliest, ctime (&info->earliest));
+ (long)info->earliest, ctime (&info->earliest));
g_date_clear (&info->closing_date, 1);
g_date_set_time_t (&info->closing_date, info->earliest);
More information about the gnucash-devel
mailing list