|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2013-03-24 16:35 UTC] ramsey@php.net
-Assigned To: ramsey
+Assigned To: pollita
[2013-03-24 16:35 UTC] ramsey@php.net
[2017-01-10 07:42 UTC] kalle@php.net
-Status: Assigned
+Status: Suspended
-Assigned To: pollita
+Assigned To:
[2017-01-10 07:42 UTC] kalle@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Nov 04 23:00:01 2025 UTC |
Description: ------------ On NetWare I have a very strict compiler which errors out with type mismatches. Reproduce code: --------------- Here's a patch which makes it compile: --- pdo_user_driver.c.orig Tue Oct 30 20:09:58 2007 +++ pdo_user_driver.c Wed Dec 26 22:33:10 2007 @@ -73,7 +73,7 @@ ZVAL_STRINGL(&fname, PHP_PDO_USER_DRV_PREPARER, sizeof(PHP_PDO_USER_DRV_PREPARER) - 1, 0); MAKE_STD_ZVAL(args[0]); - ZVAL_STRINGL(args[0], sql, sql_len, 1); + ZVAL_STRINGL(args[0], (char*)sql, sql_len, 1); args[1] = driver_options ? driver_options : EG(uninitialized_zval_ptr); ALLOC_INIT_ZVAL(retval); @@ -440,7 +440,7 @@ /* $dsn */ MAKE_STD_ZVAL(args[0]); - ZVAL_STRINGL(args[0], dbh->data_source, dbh->data_source_len, 1); + ZVAL_STRINGL(args[0], (char*)dbh->data_source, dbh->data_source_len, 1); /* $user */ MAKE_STD_ZVAL(args[1]); ############################################################################ --- pdo_user_object.c.orig Tue Oct 30 20:09:58 2007 +++ pdo_user_object.c Wed Dec 26 22:37:28 2007 @@ -94,7 +94,7 @@ if (val) { php_error_docref(NULL TSRMLS_CC, E_WARNING, "Cannot override data source"); } - RETVAL_STRINGL(data->dbh->data_source, data->dbh->data_source_len, 1); + RETVAL_STRINGL((char*)data->dbh->data_source, data->dbh->data_source_len, 1); break; } @@ -281,7 +281,7 @@ * Gonna have to step through the slow way... */ while (labels->label) { if (labels->id == tokenid) { - RETURN_STRING(labels->label, 1); + RETURN_STRING((char*)labels->label, 1); } labels++; } @@ -292,7 +292,7 @@ /* }}} */ static void *pdo_user_malloc_wrapper(size_t x) { return emalloc(x); } -static void pdo_user_free_wrapper(size_t x) { efree(x); } +static void pdo_user_free_wrapper(void* x) { efree(x); } /* {{{ proto array PDO_User::parseSQL(string sql) Compile a SQL statement into a query structure */ Expected result: ---------------- compilation succeeds. Actual result: -------------- compilation breaks.