Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Leap:42.2
flex
0003-Removed-some-type-conversion-warnings.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0003-Removed-some-type-conversion-warnings.patch of Package flex
From 0c78316b1335ba52bf1a9b2810774a3c50272711 Mon Sep 17 00:00:00 2001 From: Robert Larice <Robert.Larice@t-online.de> Date: Fri, 26 Feb 2016 20:23:05 -0500 Subject: [PATCH 3/4] Removed some type conversion warnings Git-commit: de03dfb8faf283a5e24556dd6d90180fd61b1df2 Patch-mainline: v2.6.1 References: bsc#990856, CVE-2016-6354 --- flex.skl | 10 +++++----- gen.c | 8 ++++---- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/flex.skl b/flex.skl index bf01e3bae8d7..ca533077bf07 100644 --- a/flex.skl +++ b/flex.skl @@ -1690,7 +1690,7 @@ m4_ifdef( [[M4_YY_USES_REJECT]], YY_G(yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset]; - num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - + num_to_read = (int) YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; ]]) } @@ -1821,7 +1821,7 @@ m4_ifdef( [[M4_YY_NO_UNPUT]],, yy_cp += (int) (dest - source); yy_bp += (int) (dest - source); YY_CURRENT_BUFFER_LVALUE->yy_n_chars = - YY_G(yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_buf_size; + YY_G(yy_n_chars) = (int) YY_CURRENT_BUFFER_LVALUE->yy_buf_size; if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) YY_FATAL_ERROR( "flex scanner push-back overflow" ); @@ -2339,7 +2339,7 @@ YY_BUFFER_STATE yy_scan_string YYFARGS1( yyconst char *, yystr) { m4_dnl M4_YY_DECL_GUTS_VAR(); - return yy_scan_bytes( yystr, strlen(yystr) M4_YY_CALL_LAST_ARG); + return yy_scan_bytes( yystr, (int) strlen(yystr) M4_YY_CALL_LAST_ARG); } %endif ]]) @@ -2364,7 +2364,7 @@ YY_BUFFER_STATE yy_scan_bytes YYFARGS2( yyconst char *,yybytes, yy_size_t ,_yyb m4_dnl M4_YY_DECL_GUTS_VAR(); /* Get memory for full buffer, including space for trailing EOB's. */ - n = _yybytes_len + 2; + n = (yy_size_t) _yybytes_len + 2; buf = (char *) yyalloc( n M4_YY_CALL_LAST_ARG ); if ( ! buf ) YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" ); @@ -2404,7 +2404,7 @@ m4_ifdef( [[M4_YY_NO_PUSH_STATE]],, yy_size_t new_size; YY_G(yy_start_stack_depth) += YY_START_STACK_INCR; - new_size = YY_G(yy_start_stack_depth) * sizeof( int ); + new_size = (yy_size_t) YY_G(yy_start_stack_depth) * sizeof( int ); if ( ! YY_G(yy_start_stack) ) YY_G(yy_start_stack) = (int *) yyalloc( new_size M4_YY_CALL_LAST_ARG ); diff --git a/gen.c b/gen.c index 5a5daef95758..220623b0cdc1 100644 --- a/gen.c +++ b/gen.c @@ -744,7 +744,7 @@ void gen_next_compressed_state (char_map) indent_down (); indent_puts - ("yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];"); + ("yy_current_state = yy_nxt[yy_base[yy_current_state] + (flex_int16_t) yy_c];"); } @@ -1516,11 +1516,11 @@ void make_tables () if (yymore_used && !yytext_is_array) { indent_puts ("YY_G(yytext_ptr) -= YY_G(yy_more_len); \\"); indent_puts - ("yyleng = (size_t) (yy_cp - YY_G(yytext_ptr)); \\"); + ("yyleng = (int) (yy_cp - YY_G(yytext_ptr)); \\"); } else - indent_puts ("yyleng = (size_t) (yy_cp - yy_bp); \\"); + indent_puts ("yyleng = (int) (yy_cp - yy_bp); \\"); /* Now also deal with copying yytext_ptr to yytext if needed. */ skelout (); /* %% [3.0] - break point in skel */ @@ -1903,7 +1903,7 @@ void make_tables () outn ("\telse \\"); outn ("\t\t{ \\"); outn ("\t\terrno=0; \\"); - outn ("\t\twhile ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \\"); + outn ("\t\twhile ( (result = (int) fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \\"); outn ("\t\t\t{ \\"); outn ("\t\t\tif( errno != EINTR) \\"); outn ("\t\t\t\t{ \\"); -- 2.6.6
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor