Karl Hegbloom's fixes to suppress compiler warnings on amd64.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/branches/gnucash-gnome2-dev@11564 57a11ea4-9604-0410-9ed3-97b8803252fd
archive
David Hampton 21 years ago committed by John Ralls
parent 871086c588
commit 96d3d52046

@ -1,3 +1,14 @@
2005-11-01 Karl Hegbloom <hegbloom@pdx.edu>
* src/backend/postgres/upgrade.c:
* src/backend/postgres/price.c: Use glib
* src/backend/postgres/base-autogen.c:
* src/backend/postgres/kvp-sql.c: Use glib macros for type
conversions to suppress compiler warnings on amd64.
* src/backend/postgres/putil.h: Cast fun to long long int to
suppress compiler warning on amd64.
2005-10-31 David Hampton <hampton@employees.org>
* macros/autogen.sh: Remove obsolete warning about gettext.

@ -121,7 +121,7 @@ static gpointer
ival_cb (PGBackend *be, PGresult *result, int j, gpointer data)
{
int ival = atoi (DB_GET_VAL ("ipath", 0));
return (gpointer) ival;
return GINT_TO_POINTER(ival);
}
@ -143,7 +143,7 @@ pgendGetCache (PGBackend *be, const char *val_str, sqlEscape *escape)
p = stpcpy (p, "';");
SEND_QUERY (be,be->buff, 0);
ival = (int) pgendGetResults (be, ival_cb, (gpointer) 0);
ival = GPOINTER_TO_INT(pgendGetResults (be, ival_cb, (gpointer) 0));
if (ival) return ival;
/* Else, this guid has never been stored before.

@ -197,7 +197,7 @@ foreach_price_cb (GNCPrice *pr, gpointer bend)
static gboolean
commodity_mark_cb (gnc_commodity *cm, gpointer user_data)
{
gint32 v = ((gint32) user_data) & 0xffff;
gint32 v = ((gint32) GPOINTER_TO_INT(user_data)) & 0xffff;
gnc_commodity_set_mark (cm, (gint16) v);
return TRUE;
}

@ -318,7 +318,7 @@ int finishQuery(PGBackend *be);
#define COMP_INT64(sqlname,fun,ndiffs) { \
if (strtoll (DB_GET_VAL(sqlname,0), NULL, 0) != fun) { \
PINFO("mis-match: %s sql='%s', eng='%lld'", sqlname, \
DB_GET_VAL (sqlname,0), fun); \
DB_GET_VAL (sqlname,0), (long long int) fun); \
ndiffs++; \
} \
}

@ -126,7 +126,7 @@ static gpointer
get_iguid_cb (PGBackend *be, PGresult *result, int j, gpointer data)
{
int fin = atoi(DB_GET_VAL ("iguid", j));
return (gpointer) fin;
return GINT_TO_POINTER(fin);
}
@ -150,7 +150,7 @@ put_iguid_in_tables (PGBackend *be)
p = "SELECT iguid FROM gncGUIDCache ORDER BY iguid DESC LIMIT 1;";
SEND_QUERY (be,p, );
iguid = (guint32) pgendGetResults (be, get_iguid_cb, 0);
iguid = (guint32) GPOINTER_TO_UINT(pgendGetResults (be, get_iguid_cb, 0));
iguid ++;
sprintf(buff, "CREATE SEQUENCE gnc_iguid_seq START %d;", iguid);

Loading…
Cancel
Save