diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2015-03-28 19:04:13 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2015-03-28 19:09:21 +0100 |
commit | 33815ec44937f731ce3de9146a97265662d0d206 (patch) | |
tree | 40257290d306f43f9e5bb521c9ac9344a11cfd88 /hwpfilter/source/lexer.cxx | |
parent | 5d950b3afd91e87035d24b550f29d0b3a7c5033b (diff) |
Clean up C-style casts from pointers to void
Change-Id: Ifbdbd2bb8a21afa76271728c46f88c11a887fc5a
Diffstat (limited to 'hwpfilter/source/lexer.cxx')
-rw-r--r-- | hwpfilter/source/lexer.cxx | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/hwpfilter/source/lexer.cxx b/hwpfilter/source/lexer.cxx index efea4760fab5..1424d3bd8b04 100644 --- a/hwpfilter/source/lexer.cxx +++ b/hwpfilter/source/lexer.cxx @@ -1588,10 +1588,10 @@ static int yy_get_next_buffer() else b->yy_buf_size *= 2; - b->yy_ch_buf = (char *) + b->yy_ch_buf = static_cast<char *>( /* Include room in for 2 EOB chars. */ yy_flex_realloc( (void *) b->yy_ch_buf, - b->yy_buf_size + 2 ); + b->yy_buf_size + 2 )); } else /* Can't grow it, we don't own it. */ @@ -1779,7 +1779,7 @@ int size; { YY_BUFFER_STATE b; - b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) ); + b = static_cast<YY_BUFFER_STATE>(yy_flex_alloc( sizeof( struct yy_buffer_state ) )); if ( ! b ) YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); @@ -1788,7 +1788,7 @@ int size; /* yy_ch_buf has to be 2 characters longer than the size given because * we need to put in 2 end-of-buffer characters. */ - b->yy_ch_buf = (char *) yy_flex_alloc( b->yy_buf_size + 2 ); + b->yy_ch_buf = static_cast<char *>(yy_flex_alloc( b->yy_buf_size + 2 )); if ( ! b->yy_ch_buf ) YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); @@ -1900,7 +1900,7 @@ yy_size_t size; /* They forgot to leave room for the EOB's. */ return 0; - b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) ); + b = static_cast<YY_BUFFER_STATE>(yy_flex_alloc( sizeof( struct yy_buffer_state ) )); if ( ! b ) YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" ); @@ -1954,7 +1954,7 @@ int len; /* Get memory for full buffer, including space for trailing EOB's. */ n = len + 2; - buf = (char *) yy_flex_alloc( n ); + buf = static_cast<char *>(yy_flex_alloc( n )); if ( ! buf ) YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" ); @@ -2106,7 +2106,7 @@ yy_size_t size; * any pointer type to void*, and deal with argument conversions * as though doing an assignment. */ - return (void *) realloc( (char *) ptr, size ); + return (void *) realloc( ptr, size ); } #ifdef YY_USE_PROTOS |