From 5f555fb19e9298e0d568db8004b5ddb043945b92 Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Wed, 11 Sep 2019 00:52:54 +0300 Subject: [PATCH] Fixed bad format string --- ext/ffi/ffi.g | 2 +- ext/ffi/ffi_parser.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ext/ffi/ffi.g b/ext/ffi/ffi.g index e99f951f90..4443fb4220 100644 --- a/ext/ffi/ffi.g +++ b/ext/ffi/ffi.g @@ -221,7 +221,7 @@ type_specifier(zend_ffi_dcl *dcl): | {if (dcl->flags & ZEND_FFI_DCL_TYPE_SPECIFIERS) yy_error_sym("unexpected", sym);} "_Bool" {dcl->flags |= ZEND_FFI_DCL_BOOL;} - | {if (dcl->flags & (ZEND_FFI_DCL_TYPE_SPECIFIERS-(ZEND_FFI_DCL_FLOAT|ZEND_FFI_DCL_DOUBLE|ZEND_FFI_DCL_LONG))) yy_error_sym("Unexpected '%s'", sym);} + | {if (dcl->flags & (ZEND_FFI_DCL_TYPE_SPECIFIERS-(ZEND_FFI_DCL_FLOAT|ZEND_FFI_DCL_DOUBLE|ZEND_FFI_DCL_LONG))) yy_error_sym("unexpected", sym);} ("_Complex"|"complex"|"__complex"|"__complex__") {dcl->flags |= ZEND_FFI_DCL_COMPLEX;} // | "_Atomic" "(" type_name ")" // TODO: not-implemented ??? diff --git a/ext/ffi/ffi_parser.c b/ext/ffi/ffi_parser.c index c48c9d5f6c..cb23b05b78 100644 --- a/ext/ffi/ffi_parser.c +++ b/ext/ffi/ffi_parser.c @@ -2277,7 +2277,7 @@ static int parse_type_specifier(int sym, zend_ffi_dcl *dcl) { case YY_COMPLEX: case YY___COMPLEX: case YY___COMPLEX__: - if (dcl->flags & (ZEND_FFI_DCL_TYPE_SPECIFIERS-(ZEND_FFI_DCL_FLOAT|ZEND_FFI_DCL_DOUBLE|ZEND_FFI_DCL_LONG))) yy_error_sym("Unexpected '%s'", sym); + if (dcl->flags & (ZEND_FFI_DCL_TYPE_SPECIFIERS-(ZEND_FFI_DCL_FLOAT|ZEND_FFI_DCL_DOUBLE|ZEND_FFI_DCL_LONG))) yy_error_sym("unexpected", sym); sym = get_sym(); dcl->flags |= ZEND_FFI_DCL_COMPLEX; break; -- 2.40.0