r15849 - gnucash/trunk/src/business/business-core - Fix compiler complaints about dereferencing type-punned pointers.

David Hampton hampton at cvs.gnucash.org
Sat Apr 7 14:24:54 EDT 2007


Author: hampton
Date: 2007-04-07 14:24:53 -0400 (Sat, 07 Apr 2007)
New Revision: 15849
Trac: http://svn.gnucash.org/trac/changeset/15849

Modified:
   gnucash/trunk/src/business/business-core/gncInvoice.c
Log:
Fix compiler complaints about dereferencing type-punned pointers.


Modified: gnucash/trunk/src/business/business-core/gncInvoice.c
===================================================================
--- gnucash/trunk/src/business/business-core/gncInvoice.c	2007-04-07 16:12:31 UTC (rev 15848)
+++ gnucash/trunk/src/business/business-core/gncInvoice.c	2007-04-07 18:24:53 UTC (rev 15849)
@@ -484,15 +484,21 @@
 static QofInstance*
 qofInvoiceGetOwner (GncInvoice *invoice)
 {
+	GncOwner *owner;
+
 	if(!invoice) { return NULL; }
-	return QOF_INSTANCE(&invoice->owner);
+	owner = &invoice->owner;
+	return QOF_INSTANCE(owner);
 }
 
 static QofInstance*
 qofInvoiceGetBillTo (GncInvoice *invoice)
 {
+	GncOwner *billto;
+
 	if(!invoice) { return NULL; }
-	return QOF_INSTANCE(&invoice->billto);
+	billto = &invoice->billto;
+	return QOF_INSTANCE(billto);
 }
 
 Timespec gncInvoiceGetDateOpened (GncInvoice *invoice)



More information about the gnucash-changes mailing list