Update of /cvsroot/monetdb/clients/src/php/Cimpl
In directory
sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv3622/clients/src/php/Cimpl
Modified Files:
Tag: Clients_1-20
Makefile.ag php_monetdb.c
Log Message:
mark knownly unused parameters in the code
instead of squashing the compiler error
Index: Makefile.ag
===================================================================
RCS file: /cvsroot/monetdb/clients/src/php/Cimpl/Makefile.ag,v
retrieving revision 1.4.4.2
retrieving revision 1.4.4.3
diff -u -d -r1.4.4.2 -r1.4.4.3
--- Makefile.ag 6 Nov 2007 11:55:46 -0000 1.4.4.2
+++ Makefile.ag 6 Nov 2007 14:22:13 -0000 1.4.4.3
@@ -26,11 +26,10 @@
# (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",
-# "warning: unused parameter '...'", and/or
+# "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-unused-parameter -Wno-undef".
+# 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',
Index: php_monetdb.c
===================================================================
RCS file: /cvsroot/monetdb/clients/src/php/Cimpl/php_monetdb.c,v
retrieving revision 1.6.2.2
retrieving revision 1.6.2.3
diff -u -d -r1.6.2.2 -r1.6.2.3
--- php_monetdb.c 6 Nov 2007 11:41:46 -0000 1.6.2.2
+++ php_monetdb.c 6 Nov 2007 14:22:13 -0000 1.6.2.3
@@ -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();
@@ -428,6 +431,9 @@
*/
PHP_MSHUTDOWN_FUNCTION(monetdb)
{
+ /* unused parameters */
+ (void) type;
+
UNREGISTER_INI_ENTRIES();
zend_hash_destroy(&MG(notices));
zend_hash_destroy(&MG(errors));
@@ -440,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;
@@ -450,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));
@@ -504,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)
@@ -706,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);
@@ -754,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);
@@ -852,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 {
@@ -887,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) {
@@ -1305,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;
}
@@ -1363,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;
@@ -1389,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;
}
@@ -1461,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;
}
@@ -1493,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;
@@ -1579,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;
@@ -1809,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;
}
@@ -1837,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;
@@ -1935,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;
}
@@ -1955,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;
@@ -1976,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;
@@ -1995,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