]> granicus.if.org Git - php/commitdiff
Explicitly declare the char as signed in zend_ffi_val.
authorGeorge Peter Banyard <girgias@php.net>
Thu, 26 Mar 2020 02:20:10 +0000 (03:20 +0100)
committerDmitry Stogov <dmitry@zend.com>
Thu, 26 Mar 2020 07:22:34 +0000 (10:22 +0300)
This causes issues down the line as char are unsigned on some platforms,
e.g. ARM and cause a [-Wtype-limits] warning to be emitted.

ext/ffi/php_ffi.h

index fc6120de7981fef0616c046f50422945a9e5f8af..3a10b45478c2a9ff3c6322cf43938a2880a9939b 100644 (file)
@@ -198,7 +198,7 @@ typedef struct _zend_ffi_val {
                uint64_t        u64;
                int64_t         i64;
                zend_ffi_double d;
-               char            ch;
+               signed char     ch;
                struct {
                        const char *str;
                        size_t      len;