Fix the build with clang.

PR:		ports/169381
Submitted by:	pawel@
This commit is contained in:
Koop Mast 2012-07-13 11:46:26 +00:00
parent f5fda60df9
commit 80644e2fc3
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=300853
2 changed files with 52 additions and 0 deletions

View file

@ -0,0 +1,41 @@
--- lib/gda-server/gda-server-connection.c.orig 2012-06-24 18:42:20.000000000 +0200
+++ lib/gda-server/gda-server-connection.c 2012-06-24 18:47:17.000000000 +0200
@@ -247,7 +247,7 @@
GdaServerConnection *cnc =
(GdaServerConnection *) bonobo_x_object (servant);
- g_return_if_fail (GDA_IS_SERVER_CONNECTION (cnc));
+ g_return_val_if_fail (GDA_IS_SERVER_CONNECTION (cnc), NULL);
retval = gda_server_connection_create_table (cnc, (GDA_RowAttributes *) columns);
if (!retval)
@@ -713,10 +713,10 @@
gchar *
gda_server_connection_sql2xml (GdaServerConnection * cnc, const gchar * sql)
{
- g_return_if_fail (cnc != NULL);
- g_return_if_fail (cnc->server_impl != NULL);
- g_return_if_fail (cnc->server_impl->functions.connection_sql2xml !=
- NULL);
+ g_return_val_if_fail (cnc != NULL, NULL);
+ g_return_val_if_fail (cnc->server_impl != NULL, NULL);
+ g_return_val_if_fail (cnc->server_impl->functions.connection_sql2xml !=
+ NULL, NULL);
return cnc->server_impl->functions.connection_sql2xml (cnc, sql);
}
@@ -727,10 +727,10 @@
gchar *
gda_server_connection_xml2sql (GdaServerConnection * cnc, const gchar * xml)
{
- g_return_if_fail (cnc != NULL);
- g_return_if_fail (cnc->server_impl != NULL);
- g_return_if_fail (cnc->server_impl->functions.connection_xml2sql !=
- NULL);
+ g_return_val_if_fail (cnc != NULL, NULL);
+ g_return_val_if_fail (cnc->server_impl != NULL, NULL);
+ g_return_val_if_fail (cnc->server_impl->functions.connection_xml2sql !=
+ NULL, NULL);
return cnc->server_impl->functions.connection_xml2sql (cnc, xml);
}

View file

@ -0,0 +1,11 @@
--- providers/gda-default-server/gda-default-recordset.c.orig 2012-06-24 18:51:52.000000000 +0200
+++ providers/gda-default-server/gda-default-recordset.c 2012-06-24 18:52:59.000000000 +0200
@@ -115,7 +115,7 @@
{
DEFAULT_Recordset *default_recset;
- g_return_if_fail(recset != NULL);
+ g_return_val_if_fail(recset != NULL, -1);
default_recset = (DEFAULT_Recordset *) gda_server_recordset_get_user_data(recset);
if (default_recset) {