One more (may be stupid) question: Herbert Thoma schrieb: > Phil Longstaff schrieb: >> No, it should be info->period_num = GPOINTER_TO_UINT(val). It is passed >> by value, not reference.
Why is val a gpointer then? Why can't the type just be uint? static void set_period_num( gpointer pObj, gpointer val ) { budget_amount_info_t* info = (budget_amount_info_t*)pObj; g_return_if_fail( pObj != NULL ); info->period_num = GPOINTER_TO_UINT(val); } > OK, that fixed the compiler error. > > I guess you will commit the fix to svn. > > Thanks, > Herbert. > >> Phil >> >> ------------------------------------------------------------------------ >> *From:* Herbert Thoma <herbert.th...@iis.fraunhofer.de> >> *To:* gnucash-devel@gnucash.org; Phil Longstaff <plongst...@rogers.com> >> *Sent:* Monday, August 17, 2009 10:49:11 AM >> *Subject:* Re: r18254 - gnucash/trunk/src/backend/sql - Fix CRIT >> messages when loading budgets >> >> Hi Phil, >> >> I don't know if it is caused by this change, but I get a >> compiler error: >> >> gnc-budget-sql.c: In function ‘set_period_num’: >> gnc-budget-sql.c:156: error: cast from pointer to integer of different size >> >> The offending line is: >> >> info->period_num = (guint)val; >> >> Perhaps you meant something like this: >> >> info->period_num = *((guint *)val); >> >> Herbert. >> >> Phil Longstaff schrieb: >>> Author: plongstaff >>> Date: 2009-08-16 13:09:28 -0400 (Sun, 16 Aug 2009) >>> New Revision: 18254 >>> Trac: http://svn.gnucash.org/trac/changeset/18254 >>> >>> Modified: >>> gnucash/trunk/src/backend/sql/gnc-budget-sql.c >>> Log: >>> Fix CRIT messages when loading budgets >>> >>> >>> _______________________________________________ >>> gnucash-patches mailing list >>> gnucash-patc...@gnucash.org <mailto:gnucash-patc...@gnucash.org> >>> https://lists.gnucash.org/mailman/listinfo/gnucash-patches >>> >> -- >> Herbert Thoma >> Dipl.-Ing., MBA >> Head of Video Group >> Multimedia Realtime Systems Department >> Fraunhofer IIS >> Am Wolfsmantel 33, 91058 Erlangen, Germany >> Phone: +49-9131-776-6130 >> Fax: +49-9131-776-6099 >> email: t...@iis.fhg.de <mailto:t...@iis.fhg.de> >> www: http://www.iis.fhg.de/ > -- Herbert Thoma Dipl.-Ing., MBA Head of Video Group Multimedia Realtime Systems Department Fraunhofer IIS Am Wolfsmantel 33, 91058 Erlangen, Germany Phone: +49-9131-776-6130 Fax: +49-9131-776-6099 email: t...@iis.fhg.de www: http://www.iis.fhg.de/ _______________________________________________ gnucash-devel mailing list gnucash-devel@gnucash.org https://lists.gnucash.org/mailman/listinfo/gnucash-devel