]> granicus.if.org Git - php/commitdiff
Suppress a dozen unused return value warnings in places where the return
authorRasmus Lerdorf <rasmus@php.net>
Mon, 16 May 2011 17:22:41 +0000 (17:22 +0000)
committerRasmus Lerdorf <rasmus@php.net>
Mon, 16 May 2011 17:22:41 +0000 (17:22 +0000)
value is really not useful to us.

Zend/zend_language_scanner.l
ext/standard/exec.c
ext/standard/file.c
ext/standard/proc_open.c
ext/standard/string.c

index 1e7f92d285a460030941d7c48ae9fdbe9b20ae3a..36ba3b2f8bc813646dd8f61d7276fc1a5ef6773b 100644 (file)
@@ -1614,9 +1614,9 @@ NEWLINE ("\r"|"\n"|"\r\n")
        if (strcmp(dirname, ".") == 0) {
                dirname = erealloc(dirname, MAXPATHLEN);
 #if HAVE_GETCWD
-               VCWD_GETCWD(dirname, MAXPATHLEN);
+               php_ignore_value(VCWD_GETCWD(dirname, MAXPATHLEN));
 #elif HAVE_GETWD
-               VCWD_GETWD(dirname);
+               php_ignore_value(VCWD_GETWD(dirname));
 #endif
        }
 
index 11b7c2c5e6d0ea05b0832bc0baefdaa29db2a2f9..890f73726bc20a1d7a864cff0fd2902653fbb024 100644 (file)
@@ -484,7 +484,7 @@ PHP_FUNCTION(proc_nice)
        }
 
        errno = 0;
-       nice(pri);
+       php_ignore_value(nice(pri));
        if (errno) {
                php_error_docref(NULL TSRMLS_CC, E_WARNING, "Only a super user may attempt to increase the priority of a process");
                RETURN_FALSE;
index c6b585c2c7567eb85065f38dff032f2c078fb3a0..527f12df61e829aebbc824b800241e77677361a5 100644 (file)
@@ -1808,7 +1808,7 @@ static const char *php_fgetcsv_lookup_trailing_spaces(const char *ptr, size_t le
                        case -2:
                        case -1:
                                inc_len = 1;
-                               php_mblen(NULL, 0);
+                               php_ignore_value(php_mblen(NULL, 0));
                                break;
                        case 0:
                                goto quit_loop;
@@ -2072,7 +2072,7 @@ PHPAPI void php_fgetcsv(php_stream *stream, char delimiter, char enclosure, char
        zend_bool first_field = 1;
 
        /* initialize internal state */
-       php_mblen(NULL, 0);
+       php_ignore_value(php_mblen(NULL, 0));
 
        /* Now into new section that parses buf for delimiter/enclosure fields */
 
@@ -2105,7 +2105,7 @@ PHPAPI void php_fgetcsv(php_stream *stream, char delimiter, char enclosure, char
                                case -2:
                                case -1:
                                        inc_len = 1;
-                                       php_mblen(NULL, 0);
+                                       php_ignore_value(php_mblen(NULL, 0));
                                        break;
                                case 0:
                                        goto quit_loop_1;
@@ -2199,7 +2199,7 @@ PHPAPI void php_fgetcsv(php_stream *stream, char delimiter, char enclosure, char
 
                                        case -2:
                                        case -1:
-                                               php_mblen(NULL, 0);
+                                               php_ignore_value(php_mblen(NULL, 0));
                                                /* break is omitted intentionally */
                                        case 1:
                                                /* we need to determine if the enclosure is
@@ -2267,7 +2267,7 @@ PHPAPI void php_fgetcsv(php_stream *stream, char delimiter, char enclosure, char
                                        case -2:
                                        case -1:
                                                inc_len = 1;
-                                               php_mblen(NULL, 0);
+                                               php_ignore_value(php_mblen(NULL, 0));
                                                /* break is omitted intentionally */
                                        case 1:
                                                if (*bptr == delimiter) {
@@ -2298,7 +2298,7 @@ PHPAPI void php_fgetcsv(php_stream *stream, char delimiter, char enclosure, char
                                        case -2:
                                        case -1:
                                                inc_len = 1;
-                                               php_mblen(NULL, 0);
+                                               php_ignore_value(php_mblen(NULL, 0));
                                                /* break is omitted intentionally */
                                        case 1:
                                                if (*bptr == delimiter) {
index 8240bed20535767dd9daafad8e0531c8896d4aea..9544cc03da64fc02ce5c5f4bd144475d90816d82 100644 (file)
@@ -843,7 +843,7 @@ PHP_FUNCTION(proc_open)
 #endif
 
                if (cwd) {
-                       chdir(cwd);
+                       php_ignore_value(chdir(cwd));
                }
 
                if (env.envarray) {
index 7dde105247741c60c50efb494e3ff8703ec725a6..7cd986c51e7a8d0cf5fc445141cf3b743d5dc7b9 100644 (file)
@@ -1354,7 +1354,7 @@ PHPAPI void php_basename(char *s, size_t len, char *suffix, size_t sufflen, char
                        case -2:
                        case -1:
                                inc_len = 1;
-                               php_mblen(NULL, 0);
+                               php_ignore_value(php_mblen(NULL, 0));
                                break;
                        case 0:
                                goto quit_loop;