warlord at MIT.EDU
Thu Jun 12 11:29:20 EDT 2008
Quoting Phil Longstaff <plongstaff at rogers.com>:
> Derek Atkins wrote:
>> David Reiser <dbreiser at earthlink.net> writes:
>>>>> with --enable-error-on-warning set, I get:
>>>>> cc1: warnings being treated as errors
>>>>> gnc-backend-util-sql.c: In function ‘gnc_sql_get_sql_value’:
>>>>> gnc-backend-util-sql.c:1411: warning: format ‘%d’ expects type ‘int’,
>>>>> but argument 5 has type ‘GType’
>>>>> make: *** [gnc-backend-util-sql.lo] Error 1
>>>> What machine/os/version of gcc?
>>> Mac OS X, ppc hardware, gcc 4.0.1 (Apple's version)
>> Another question is: what version of glib?
>> Phil, keep in mind that GLib changed from an "int" GType to an
>> "opaque" GType. Why are you trying to read/write a GType as
>> an int?
> When the sql backend creates an INSERT or UPDATE statement, it gets a
> list of GValues, one for each field. It then needs to convert them to
> ascii. For this, it uses g_value_transform() if the GType is
> transformable to G_TYPE_STRING. If the GType is not transformable, I
> want something in the log identifying the type, and I was using "%d" and
> the GType value. I can switch to the GType name.
That's probably safer. And a string is more user-friendly, too. ;)
Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory
Member, MIT Student Information Processing Board (SIPB)
URL: http://web.mit.edu/warlord/ PP-ASEL-IA N1NWH
warlord at MIT.EDU PGP key available
More information about the gnucash-devel