Update of /cvsroot/monetdb/clients/src/php/Cimpl
In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv10426/src/php/Cimpl
Modified Files:
Makefile.ag php_monetdb.c
Log Message:
propagated changes of Thursday Nov 01 2007 - Tuesday Nov 06 2007
from the Clients_1-20 branch to the development trunk
Index: Makefile.ag
===================================================================
RCS file: /cvsroot/monetdb/clients/src/php/Cimpl/Makefile.ag,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- Makefile.ag 3 Oct 2007 13:56:22 -0000 1.5
+++ Makefile.ag 6 Nov 2007 14:35:00 -0000 1.6
@@ -22,10 +22,23 @@
# we need this flag to allow for a name that does not start with "lib"
monetdb_la_LDFLAGS = -module
-# with gcc we could use these
-#X_CFLAGS = -Wno-unused-parameter -Wno-unused-function
-# but we certainly have to override the default X_CFLAGS:
-X_CFLAGS = -DCOMPILE_DL_MONETDB=1 -D_GNU_SOURCE
+# GNU's gcc does not like to compile swig-generated code
+# (at least not with our strict X_CFLAGS), complaining about
+# "warning: dereferencing type-punned pointer will break strict-aliasing
rules",
+# "warning: unused variable '...'",
+# "warning: '...' defined but not used", and/or
+# 'error: "..." is not defined'.
+# Hence, we use GCC_SWIG_CFLAGS to disable the respective warning
+# as locally as possbile via "-Wno-strict-aliasing -Wno-unused-variable
-Wno-unused-function -Wno-undef".
+# Intel's icc does not like to compile swig-generated code
+# (at least not with our strict X_CFLAGS), complaining about
+# 'error #869: parameter "..." was never referenced',
+# 'error #177: function "..." was declared but never referenced', and/or
+# 'error #310: old-style parameter list (anachronism)'.
+# Hence, we use ICC_SWIG_CFLAGS to disable the respective warning
+# as locally as possbile via "-wd869 -wd177 -wd310".
+# (See also buildtools/conf/MonetDB.m4.)
+CFLAGS = $(GCC_SWIG_CFLAGS) $(ICC_SWIG_CFLAGS) -DCOMPILE_DL_MONETDB=1
-D_GNU_SOURCE
SUBDIRS = examples
Index: php_monetdb.c
===================================================================
RCS file: /cvsroot/monetdb/clients/src/php/Cimpl/php_monetdb.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- php_monetdb.c 25 Oct 2007 19:29:02 -0000 1.7
+++ php_monetdb.c 6 Nov 2007 14:35:00 -0000 1.8
@@ -377,6 +377,9 @@
*/
PHP_MINIT_FUNCTION(monetdb)
{
+ /* unused parameters */
+ (void) type;
+
ZEND_INIT_MODULE_GLOBALS(monetdb, php_monetdb_init_globals, NULL);
REGISTER_INI_ENTRIES();
@@ -386,6 +389,8 @@
le_result = zend_register_list_destructors_ex(_free_result, NULL,
"monetdb result", module_number);
le_lofp = zend_register_list_destructors_ex(_free_ptr, NULL, "monetdb
large object", module_number);
le_string = zend_register_list_destructors_ex(_free_ptr, NULL, "monetdb
string", module_number);
+ (void) le_lofp; /* pacify compiler */
+ (void) le_string; /* pacify compiler */
/* For connection option */
REGISTER_LONG_CONSTANT("MONETDB_CONNECT_FORCE_NEW",
MONETDB_CONNECT_FORCE_NEW, CONST_CS | CONST_PERSISTENT);
/* For m_fetch_array() */
@@ -426,6 +431,9 @@
*/
PHP_MSHUTDOWN_FUNCTION(monetdb)
{
+ /* unused parameters */
+ (void) type;
+
UNREGISTER_INI_ENTRIES();
zend_hash_destroy(&MG(notices));
zend_hash_destroy(&MG(errors));
@@ -438,6 +446,10 @@
*/
PHP_RINIT_FUNCTION(monetdb)
{
+ /* unused parameters */
+ (void) type;
+ (void) module_number;
+
MG(default_link)=-1;
MG(num_links) = MG(num_persistent);
return SUCCESS;
@@ -448,6 +460,10 @@
*/
PHP_RSHUTDOWN_FUNCTION(monetdb)
{
+ /* unused parameters */
+ (void) type;
+ (void) module_number;
+
/* clean up notice messages */
zend_hash_clean(&MG(notices));
zend_hash_clean(&MG(errors));
@@ -502,6 +518,11 @@
Mconn *monetdb;
+ /* unused parameters */
+ (void) return_value_ptr;
+ (void) this_ptr;
+ (void) return_value_used;
+
argc = ZEND_NUM_ARGS();
if (argc > 7 ||
zend_get_parameters_array_ex(argc, args) != SUCCESS)
@@ -704,6 +725,11 @@
int id;
Mconn *monetdb;
+ /* unused parameters */
+ (void) return_value_ptr;
+ (void) this_ptr;
+ (void) return_value_used;
+
switch (ZEND_NUM_ARGS()) {
case 0:
id = MG(default_link);
@@ -752,6 +778,11 @@
int id = -1;
Mconn *monetdb;
+ /* unused parameters */
+ (void) return_value_ptr;
+ (void) this_ptr;
+ (void) return_value_used;
+
switch(ZEND_NUM_ARGS()) {
case 0:
id = MG(default_link);
@@ -850,6 +881,11 @@
int id;
Mconn *monetdb;
+ /* unused parameters */
+ (void) return_value_ptr;
+ (void) this_ptr;
+ (void) return_value_used;
+
if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ZEND_NUM_ARGS()
TSRMLS_CC, "r", &monetdb_link) == SUCCESS) {
id = -1;
} else {
@@ -885,6 +921,11 @@
Mresult *monetdb_result;
php_monetdb_result_handle *monetdb_result_h;
+ /* unused parameters */
+ (void) return_value_ptr;
+ (void) this_ptr;
+ (void) return_value_used;
+
switch(ZEND_NUM_ARGS()) {
case 1:
if (zend_get_parameters_ex(1, &query)==FAILURE) {
@@ -1303,6 +1344,11 @@
Mresult *monetdb_result;
php_monetdb_result_handle *monetdb_result_h;
+ /* unused parameters */
+ (void) return_value_ptr;
+ (void) this_ptr;
+ (void) return_value_used;
+
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1,
&result)==FAILURE) {
WRONG_PARAM_COUNT;
}
@@ -1361,6 +1407,11 @@
int id = -1;
php_monetdb_notice **notice;
+ /* unused parameters */
+ (void) return_value_ptr;
+ (void) this_ptr;
+ (void) return_value_used;
+
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r",
&monetdb_link) ==
FAILURE) {
return;
@@ -1387,6 +1438,11 @@
Mresult *monetdb_result;
php_monetdb_result_handle *monetdb_result_h;
+ /* unused parameters */
+ (void) return_value_ptr;
+ (void) this_ptr;
+ (void) return_value_used;
+
if (ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(2, &result,
&field)==FAILURE) {
WRONG_PARAM_COUNT;
}
@@ -1459,6 +1515,11 @@
php_monetdb_result_handle *monetdb_result_h;
int i;
+ /* unused parameters */
+ (void) return_value_ptr;
+ (void) this_ptr;
+ (void) return_value_used;
+
if (ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(2, &result,
&field)==FAILURE) {
WRONG_PARAM_COUNT;
}
@@ -1491,6 +1552,11 @@
int field_offset, monetdb_row;
char *data;
+ /* unused parameters */
+ (void) return_value_ptr;
+ (void) this_ptr;
+ (void) return_value_used;
+
if ((ZEND_NUM_ARGS() != 3 || zend_get_parameters_ex(3, &result, &row,
&field)==FAILURE) &&
(ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(2, &result,
&field)==FAILURE)) {
WRONG_PARAM_COUNT;
@@ -1577,6 +1643,11 @@
zval *ctor_params = NULL;
zend_class_entry *ce = NULL;
+ /* unused parameters */
+ (void) return_value_ptr;
+ (void) this_ptr;
+ (void) return_value_used;
+
if (into_object) {
char *class_name;
int class_name_len;
@@ -1807,6 +1878,11 @@
long row;
php_monetdb_result_handle *monetdb_result_h;
+ /* unused parameters */
+ (void) return_value_ptr;
+ (void) this_ptr;
+ (void) return_value_used;
+
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rl", &result,
&row) == FAILURE) {
return;
}
@@ -1835,6 +1911,11 @@
php_monetdb_result_handle *monetdb_result_h;
int field_offset, monetdb_row;
+ /* unused parameters */
+ (void) return_value_ptr;
+ (void) this_ptr;
+ (void) return_value_used;
+
if ((ZEND_NUM_ARGS() != 3 || zend_get_parameters_ex(3, &result, &row,
&field)==FAILURE) &&
(ZEND_NUM_ARGS() != 2 || zend_get_parameters_ex(2, &result,
&field)==FAILURE)) {
WRONG_PARAM_COUNT;
@@ -1933,6 +2014,11 @@
zval **result;
php_monetdb_result_handle *monetdb_result_h;
+ /* unused parameters */
+ (void) return_value_ptr;
+ (void) this_ptr;
+ (void) return_value_used;
+
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1,
&result)==FAILURE) {
WRONG_PARAM_COUNT;
}
@@ -1953,6 +2039,12 @@
char *from = NULL, *to = NULL, *ret = NULL;
int to_len;
int from_len;
+
+ /* unused parameters */
+ (void) return_value_ptr;
+ (void) this_ptr;
+ (void) return_value_used;
+
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s",
&from, &from_len) ==
FAILURE) {
return;
@@ -1974,6 +2066,11 @@
int id = -1;
Mconn *monetdb_conn;
+ /* unused parameters */
+ (void) return_value_ptr;
+ (void) this_ptr;
+ (void) return_value_used;
+
if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ZEND_NUM_ARGS()
TSRMLS_CC, "r",
&monetdb_link)
== FAILURE) {
RETURN_FALSE;
@@ -1993,6 +2090,11 @@
int id = -1;
Mconn *monetdb_conn;
+ /* unused parameters */
+ (void) return_value_ptr;
+ (void) this_ptr;
+ (void) return_value_used;
+
if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ZEND_NUM_ARGS()
TSRMLS_CC, "r",
&monetdb_link)
== FAILURE) {
RETURN_FALSE;
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Monetdb-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-checkins