1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00

fastcgi: Fix compile warning wrt safe_read() (#20887)

This shouldn't be const. Fixes the following warning:
```
warning: variable 'hdr' is uninitialized when passed as a const pointer argument here
      [-Wuninitialized-const-pointer]
 1054 |         if (safe_read(req, &hdr, sizeof(fcgi_header)) != sizeof(fcgi_header) ||
      |                             ^~~
```
This commit is contained in:
Niels Dossche
2026-01-10 10:49:37 +01:00
committed by GitHub
parent 5d2456f974
commit 60b1f59081

View File

@@ -944,7 +944,7 @@ static inline ssize_t safe_write(fcgi_request *req, const void *buf, size_t coun
return n;
}
static inline ssize_t safe_read(fcgi_request *req, const void *buf, size_t count)
static inline ssize_t safe_read(fcgi_request *req, void *buf, size_t count)
{
int ret;
size_t n = 0;