From 1257328defb00176819864becb416e65271efd49 Mon Sep 17 00:00:00 2001 From: Dmitry Stogov Date: Tue, 13 Sep 2011 13:30:18 +0000 Subject: [PATCH] Fixed ZE specific compile warnings (Bug #55629) --- Zend/zend_language_scanner.c | 709 +++++++++++++++--------------- Zend/zend_language_scanner_defs.h | 2 +- 2 files changed, 356 insertions(+), 355 deletions(-) diff --git a/Zend/zend_language_scanner.c b/Zend/zend_language_scanner.c index acc42455c2..10e50b5fff 100644 --- a/Zend/zend_language_scanner.c +++ b/Zend/zend_language_scanner.c @@ -1,4 +1,4 @@ -/* Generated by re2c 0.13.5 on Thu Aug 18 01:36:01 2011 */ +/* Generated by re2c 0.13.5 on Tue Sep 13 17:29:46 2011 */ #line 1 "Zend/zend_language_scanner.l" /* +----------------------------------------------------------------------+ @@ -471,7 +471,8 @@ ZEND_API int zend_multibyte_set_filter(const zend_encoding *onetime_encoding TSR ZEND_API int open_file_for_scanning(zend_file_handle *file_handle TSRMLS_DC) { - char *file_path = NULL, *buf; + const char *file_path = NULL; + char *buf; size_t size, offset = 0; /* The shebang line was read, get the current position to obtain the buffer start */ @@ -499,7 +500,7 @@ ZEND_API int open_file_for_scanning(zend_file_handle *file_handle TSRMLS_DC) if (size != -1) { if (CG(multibyte)) { - SCNG(script_org) = buf; + SCNG(script_org) = (unsigned char*)buf; SCNG(script_org_size) = size; SCNG(script_filtered) = NULL; @@ -510,7 +511,7 @@ ZEND_API int open_file_for_scanning(zend_file_handle *file_handle TSRMLS_DC) zend_error_noreturn(E_COMPILE_ERROR, "Could not convert the script from the detected " "encoding \"%s\" to a compatible encoding", zend_multibyte_get_encoding_name(LANG_SCNG(script_encoding))); } - buf = SCNG(script_filtered); + buf = (char*)SCNG(script_filtered); size = SCNG(script_filtered_size); } } @@ -665,7 +666,7 @@ ZEND_API int zend_prepare_string_for_scanning(zval *str, char *filename TSRMLS_D size = str->value.str.len; if (CG(multibyte)) { - SCNG(script_org) = buf; + SCNG(script_org) = (unsigned char*)buf; SCNG(script_org_size) = size; SCNG(script_filtered) = NULL; @@ -676,7 +677,7 @@ ZEND_API int zend_prepare_string_for_scanning(zval *str, char *filename TSRMLS_D zend_error_noreturn(E_COMPILE_ERROR, "Could not convert the script from the detected " "encoding \"%s\" to a compatible encoding", zend_multibyte_get_encoding_name(LANG_SCNG(script_encoding))); } - buf = SCNG(script_filtered); + buf = (char*)SCNG(script_filtered); size = SCNG(script_filtered_size); } } @@ -822,7 +823,7 @@ int highlight_string(zval *str, zend_syntax_highlighter_ini *syntax_highlighter_ return SUCCESS; } -ZEND_API void zend_multibyte_yyinput_again(zend_encoding_filter old_input_filter, zend_encoding *old_encoding TSRMLS_DC) +ZEND_API void zend_multibyte_yyinput_again(zend_encoding_filter old_input_filter, const zend_encoding *old_encoding TSRMLS_DC) { size_t length; unsigned char *new_yy_start; @@ -984,7 +985,7 @@ restart: yymore_restart: -#line 988 "Zend/zend_language_scanner.c" +#line 989 "Zend/zend_language_scanner.c" { YYCTYPE yych; unsigned int yyaccept = 0; @@ -1083,7 +1084,7 @@ yyc_INITIAL: yy3: YYDEBUG(3, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1768 "Zend/zend_language_scanner.l" +#line 1769 "Zend/zend_language_scanner.l" { if (YYCURSOR > YYLIMIT) { return 0; @@ -1099,7 +1100,7 @@ inline_char_handler: if (YYCURSOR < YYLIMIT) { switch (*YYCURSOR) { case '?': - if (CG(short_tags) || !strncasecmp(YYCURSOR + 1, "php", 3) || (*(YYCURSOR + 1) == '=')) { /* Assume [ \t\n\r] follows "php" */ + if (CG(short_tags) || !strncasecmp((char*)YYCURSOR + 1, "php", 3) || (*(YYCURSOR + 1) == '=')) { /* Assume [ \t\n\r] follows "php" */ break; } continue; @@ -1143,7 +1144,7 @@ inline_html: HANDLE_NEWLINES(yytext, yyleng); return T_INLINE_HTML; } -#line 1147 "Zend/zend_language_scanner.c" +#line 1148 "Zend/zend_language_scanner.c" yy4: YYDEBUG(4, *YYCURSOR); yych = *++YYCURSOR; @@ -1161,7 +1162,7 @@ yy5: yy6: YYDEBUG(6, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1756 "Zend/zend_language_scanner.l" +#line 1757 "Zend/zend_language_scanner.l" { if (CG(short_tags)) { zendlval->value.str.val = yytext; /* no copying - intentional */ @@ -1173,14 +1174,14 @@ yy6: goto inline_char_handler; } } -#line 1177 "Zend/zend_language_scanner.c" +#line 1178 "Zend/zend_language_scanner.c" yy7: YYDEBUG(7, *YYCURSOR); ++YYCURSOR; if ((yych = *YYCURSOR) == '=') goto yy43; YYDEBUG(8, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1733 "Zend/zend_language_scanner.l" +#line 1734 "Zend/zend_language_scanner.l" { if (CG(asp_tags)) { zendlval->value.str.val = yytext; /* no copying - intentional */ @@ -1192,7 +1193,7 @@ yy7: goto inline_char_handler; } } -#line 1196 "Zend/zend_language_scanner.c" +#line 1197 "Zend/zend_language_scanner.c" yy9: YYDEBUG(9, *YYCURSOR); yych = *++YYCURSOR; @@ -1378,9 +1379,9 @@ yy35: ++YYCURSOR; YYDEBUG(38, *YYCURSOR); yyleng = YYCURSOR - SCNG(yy_text); -#line 1693 "Zend/zend_language_scanner.l" +#line 1694 "Zend/zend_language_scanner.l" { - YYCTYPE *bracket = zend_memrchr(yytext, '<', yyleng - (sizeof("script language=php>") - 1)); + YYCTYPE *bracket = (YYCTYPE*)zend_memrchr(yytext, '<', yyleng - (sizeof("script language=php>") - 1)); if (bracket != SCNG(yy_text)) { /* Handle previously scanned HTML, as possible