mirror of
https://github.com/VirusTotal/yara.git
synced 2026-10-12 02:10:00 +00:00
Fix warnings
This commit is contained in:
+5
-5
@@ -243,7 +243,7 @@ struct yy_buffer_state
|
||||
/* Number of characters read into yy_ch_buf, not including EOB
|
||||
* characters.
|
||||
*/
|
||||
int yy_n_chars;
|
||||
yy_size_t yy_n_chars;
|
||||
|
||||
/* Whether we "own" the buffer - i.e., we know we created it,
|
||||
* and can realloc() it to grow it, and should free() it to
|
||||
@@ -575,7 +575,7 @@ struct yyguts_t
|
||||
size_t yy_buffer_stack_max; /**< capacity of stack. */
|
||||
YY_BUFFER_STATE * yy_buffer_stack; /**< Stack as an array. */
|
||||
char yy_hold_char;
|
||||
int yy_n_chars;
|
||||
yy_size_t yy_n_chars;
|
||||
yy_size_t yyleng_r;
|
||||
char *yy_c_buf_p;
|
||||
int yy_init;
|
||||
@@ -1274,9 +1274,9 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
|
||||
else
|
||||
ret_val = EOB_ACT_CONTINUE_SCAN;
|
||||
|
||||
if ((int) (yyg->yy_n_chars + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
|
||||
if ((yy_size_t) (yyg->yy_n_chars + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
|
||||
/* Extend the array by 50%, plus the number we really need. */
|
||||
int new_size = yyg->yy_n_chars + number_to_move + (yyg->yy_n_chars >> 1);
|
||||
yy_size_t new_size = yyg->yy_n_chars + number_to_move + (yyg->yy_n_chars >> 1);
|
||||
YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) hex_yyrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size ,yyscanner );
|
||||
if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
|
||||
YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" );
|
||||
@@ -1676,7 +1676,7 @@ static void hex_yyensure_buffer_stack (yyscan_t yyscanner)
|
||||
* scanner will even need a stack. We use 2 instead of 1 to avoid an
|
||||
* immediate realloc on the next call.
|
||||
*/
|
||||
num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */
|
||||
num_to_alloc = 1; // After all that talk, this was set to 1 anyways...
|
||||
yyg->yy_buffer_stack = (struct yy_buffer_state**)hex_yyalloc
|
||||
(num_to_alloc * sizeof(struct yy_buffer_state*)
|
||||
, yyscanner);
|
||||
|
||||
+1
-1
@@ -783,7 +783,7 @@ with noyywrap then we can remove this pragma.
|
||||
} \
|
||||
else \
|
||||
{ \
|
||||
str->length = (str_len); \
|
||||
str->length = (uint32_t) (str_len); \
|
||||
str->flags = 0; \
|
||||
} \
|
||||
|
||||
|
||||
Reference in New Issue
Block a user