DBI/SQL backend
Phil Longstaff
plongstaff at rogers.com
Thu Jun 12 11:19:00 EDT 2008
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[5]: *** [gnc-backend-util-sql.lo] Error 1
>>> What machine/os/version of gcc?
>>>
>>> Phil
>> 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.
Phil
More information about the gnucash-devel
mailing list