Skip to content

Commit a5eeecb

Browse files
committed
Suppress a dozen unused return value warnings in places where the return
value is really not useful to us.
1 parent 75ec1fe commit a5eeecb

File tree

7 files changed

+15
-15
lines changed

7 files changed

+15
-15
lines changed

Zend/zend_language_scanner.c

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* Generated by re2c 0.13.5 on Sun May 8 16:20:00 2011 */
1+
/* Generated by re2c 0.13.5 on Mon May 16 10:21:08 2011 */
22
#line 1 "Zend/zend_language_scanner.l"
33
/*
44
+----------------------------------------------------------------------+
@@ -4148,9 +4148,9 @@ int lex_scan(zval *zendlval TSRMLS_DC)
41484148
if (strcmp(dirname, ".") == 0) {
41494149
dirname = erealloc(dirname, MAXPATHLEN);
41504150
#if HAVE_GETCWD
4151-
VCWD_GETCWD(dirname, MAXPATHLEN);
4151+
php_ignore_value(VCWD_GETCWD(dirname, MAXPATHLEN));
41524152
#elif HAVE_GETWD
4153-
VCWD_GETWD(dirname);
4153+
php_ignore_value(VCWD_GETWD(dirname));
41544154
#endif
41554155
}
41564156

Zend/zend_language_scanner.l

+2-2
Original file line numberDiff line numberDiff line change
@@ -1614,9 +1614,9 @@ NEWLINE ("\r"|"\n"|"\r\n")
16141614
if (strcmp(dirname, ".") == 0) {
16151615
dirname = erealloc(dirname, MAXPATHLEN);
16161616
#if HAVE_GETCWD
1617-
VCWD_GETCWD(dirname, MAXPATHLEN);
1617+
php_ignore_value(VCWD_GETCWD(dirname, MAXPATHLEN));
16181618
#elif HAVE_GETWD
1619-
VCWD_GETWD(dirname);
1619+
php_ignore_value(VCWD_GETWD(dirname));
16201620
#endif
16211621
}
16221622

Zend/zend_language_scanner_defs.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* Generated by re2c 0.13.5 on Sun May 8 16:20:00 2011 */
1+
/* Generated by re2c 0.13.5 on Mon May 16 10:21:08 2011 */
22
#line 3 "Zend/zend_language_scanner_defs.h"
33

44
enum YYCONDTYPE {

ext/standard/exec.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -484,7 +484,7 @@ PHP_FUNCTION(proc_nice)
484484
}
485485

486486
errno = 0;
487-
nice(pri);
487+
php_ignore_value(nice(pri));
488488
if (errno) {
489489
php_error_docref(NULL TSRMLS_CC, E_WARNING, "Only a super user may attempt to increase the priority of a process");
490490
RETURN_FALSE;

ext/standard/file.c

+6-6
Original file line numberDiff line numberDiff line change
@@ -1808,7 +1808,7 @@ static const char *php_fgetcsv_lookup_trailing_spaces(const char *ptr, size_t le
18081808
case -2:
18091809
case -1:
18101810
inc_len = 1;
1811-
php_mblen(NULL, 0);
1811+
php_ignore_value(php_mblen(NULL, 0));
18121812
break;
18131813
case 0:
18141814
goto quit_loop;
@@ -2072,7 +2072,7 @@ PHPAPI void php_fgetcsv(php_stream *stream, char delimiter, char enclosure, char
20722072
zend_bool first_field = 1;
20732073

20742074
/* initialize internal state */
2075-
php_mblen(NULL, 0);
2075+
php_ignore_value(php_mblen(NULL, 0));
20762076

20772077
/* Now into new section that parses buf for delimiter/enclosure fields */
20782078

@@ -2105,7 +2105,7 @@ PHPAPI void php_fgetcsv(php_stream *stream, char delimiter, char enclosure, char
21052105
case -2:
21062106
case -1:
21072107
inc_len = 1;
2108-
php_mblen(NULL, 0);
2108+
php_ignore_value(php_mblen(NULL, 0));
21092109
break;
21102110
case 0:
21112111
goto quit_loop_1;
@@ -2199,7 +2199,7 @@ PHPAPI void php_fgetcsv(php_stream *stream, char delimiter, char enclosure, char
21992199

22002200
case -2:
22012201
case -1:
2202-
php_mblen(NULL, 0);
2202+
php_ignore_value(php_mblen(NULL, 0));
22032203
/* break is omitted intentionally */
22042204
case 1:
22052205
/* we need to determine if the enclosure is
@@ -2267,7 +2267,7 @@ PHPAPI void php_fgetcsv(php_stream *stream, char delimiter, char enclosure, char
22672267
case -2:
22682268
case -1:
22692269
inc_len = 1;
2270-
php_mblen(NULL, 0);
2270+
php_ignore_value(php_mblen(NULL, 0));
22712271
/* break is omitted intentionally */
22722272
case 1:
22732273
if (*bptr == delimiter) {
@@ -2298,7 +2298,7 @@ PHPAPI void php_fgetcsv(php_stream *stream, char delimiter, char enclosure, char
22982298
case -2:
22992299
case -1:
23002300
inc_len = 1;
2301-
php_mblen(NULL, 0);
2301+
php_ignore_value(php_mblen(NULL, 0));
23022302
/* break is omitted intentionally */
23032303
case 1:
23042304
if (*bptr == delimiter) {

ext/standard/proc_open.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -843,7 +843,7 @@ PHP_FUNCTION(proc_open)
843843
#endif
844844

845845
if (cwd) {
846-
chdir(cwd);
846+
php_ignore_value(chdir(cwd));
847847
}
848848

849849
if (env.envarray) {

ext/standard/string.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -1354,7 +1354,7 @@ PHPAPI void php_basename(char *s, size_t len, char *suffix, size_t sufflen, char
13541354
case -2:
13551355
case -1:
13561356
inc_len = 1;
1357-
php_mblen(NULL, 0);
1357+
php_ignore_value(php_mblen(NULL, 0));
13581358
break;
13591359
case 0:
13601360
goto quit_loop;

0 commit comments

Comments
 (0)