Skip to content

Commit f47f950

Browse files
committed
small fix
1 parent 97fe507 commit f47f950

File tree

4 files changed

+1311
-1434
lines changed

4 files changed

+1311
-1434
lines changed

src/lex.yy.c

Lines changed: 19 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11

2-
#line 3 "lex.yy.c"
2+
#line 2 "lex.yy.c"
33

44
#define YY_INT_ALIGNED short int
55

@@ -46,6 +46,7 @@ typedef int16_t flex_int16_t;
4646
typedef uint16_t flex_uint16_t;
4747
typedef int32_t flex_int32_t;
4848
typedef uint32_t flex_uint32_t;
49+
typedef uint64_t flex_uint64_t;
4950
#else
5051
typedef signed char flex_int8_t;
5152
typedef short int flex_int16_t;
@@ -154,7 +155,7 @@ typedef struct yy_buffer_state *YY_BUFFER_STATE;
154155
typedef size_t yy_size_t;
155156
#endif
156157

157-
extern int yyleng;
158+
extern yy_size_t yyleng;
158159

159160
extern FILE *yyin, *yyout;
160161

@@ -197,7 +198,7 @@ struct yy_buffer_state
197198
/* Number of characters read into yy_ch_buf, not including EOB
198199
* characters.
199200
*/
200-
int yy_n_chars;
201+
yy_size_t yy_n_chars;
201202

202203
/* Whether we "own" the buffer - i.e., we know we created it,
203204
* and can realloc() it to grow it, and should free() it to
@@ -266,8 +267,8 @@ static YY_BUFFER_STATE * yy_buffer_stack = NULL; /**< Stack as an array. */
266267

267268
/* yy_hold_char holds the character lost when yytext is formed. */
268269
static char yy_hold_char;
269-
static int yy_n_chars; /* number of characters read into yy_ch_buf */
270-
int yyleng;
270+
static yy_size_t yy_n_chars; /* number of characters read into yy_ch_buf */
271+
yy_size_t yyleng;
271272

272273
/* Points to current character in buffer. */
273274
static char *yy_c_buf_p = NULL;
@@ -294,7 +295,7 @@ static void yy_init_buffer ( YY_BUFFER_STATE b, FILE *file );
294295

295296
YY_BUFFER_STATE yy_scan_buffer ( char *base, yy_size_t size );
296297
YY_BUFFER_STATE yy_scan_string ( const char *yy_str );
297-
YY_BUFFER_STATE yy_scan_bytes ( const char *bytes, int len );
298+
YY_BUFFER_STATE yy_scan_bytes ( const char *bytes, yy_size_t len );
298299

299300
void *yyalloc ( yy_size_t );
300301
void *yyrealloc ( void *, yy_size_t );
@@ -350,7 +351,7 @@ static void yynoreturn yy_fatal_error ( const char* msg );
350351
*/
351352
#define YY_DO_BEFORE_ACTION \
352353
(yytext_ptr) = yy_bp; \
353-
yyleng = (int) (yy_cp - yy_bp); \
354+
yyleng = (yy_size_t) (yy_cp - yy_bp); \
354355
(yy_hold_char) = *yy_cp; \
355356
*yy_cp = '\0'; \
356357
(yy_c_buf_p) = yy_cp;
@@ -509,7 +510,7 @@ FILE *yyget_out ( void );
509510

510511
void yyset_out ( FILE * _out_str );
511512

512-
int yyget_leng ( void );
513+
yy_size_t yyget_leng ( void );
513514

514515
char *yyget_text ( void );
515516

@@ -578,7 +579,7 @@ static int input ( void );
578579
if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
579580
{ \
580581
int c = '*'; \
581-
int n; \
582+
yy_size_t n; \
582583
for ( n = 0; n < max_size && \
583584
(c = getc( yyin )) != EOF && c != '\n'; ++n ) \
584585
buf[n] = (char) c; \
@@ -1050,7 +1051,7 @@ static int yy_get_next_buffer (void)
10501051

10511052
else
10521053
{
1053-
int num_to_read =
1054+
yy_size_t num_to_read =
10541055
YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1;
10551056

10561057
while ( num_to_read <= 0 )
@@ -1064,7 +1065,7 @@ static int yy_get_next_buffer (void)
10641065

10651066
if ( b->yy_is_our_buffer )
10661067
{
1067-
int new_size = b->yy_buf_size * 2;
1068+
yy_size_t new_size = b->yy_buf_size * 2;
10681069

10691070
if ( new_size <= 0 )
10701071
b->yy_buf_size += b->yy_buf_size / 8;
@@ -1122,7 +1123,7 @@ static int yy_get_next_buffer (void)
11221123

11231124
if (((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) {
11241125
/* Extend the array by 50%, plus the number we really need. */
1125-
int new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
1126+
yy_size_t new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1);
11261127
YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc(
11271128
(void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf, (yy_size_t) new_size );
11281129
if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
@@ -1211,7 +1212,7 @@ static int yy_get_next_buffer (void)
12111212
if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
12121213
{ /* need to shift things up to make room */
12131214
/* +2 for EOB chars. */
1214-
int number_to_move = (yy_n_chars) + 2;
1215+
yy_size_t number_to_move = (yy_n_chars) + 2;
12151216
char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
12161217
YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2];
12171218
char *source =
@@ -1262,7 +1263,7 @@ static int yy_get_next_buffer (void)
12621263

12631264
else
12641265
{ /* need more input */
1265-
int offset = (int) ((yy_c_buf_p) - (yytext_ptr));
1266+
yy_size_t offset = (yy_c_buf_p) - (yytext_ptr);
12661267
++(yy_c_buf_p);
12671268

12681269
switch ( yy_get_next_buffer( ) )
@@ -1631,12 +1632,12 @@ YY_BUFFER_STATE yy_scan_string (const char * yystr )
16311632
*
16321633
* @return the newly allocated buffer state object.
16331634
*/
1634-
YY_BUFFER_STATE yy_scan_bytes (const char * yybytes, int _yybytes_len )
1635+
YY_BUFFER_STATE yy_scan_bytes (const char * yybytes, yy_size_t _yybytes_len )
16351636
{
16361637
YY_BUFFER_STATE b;
16371638
char *buf;
16381639
yy_size_t n;
1639-
int i;
1640+
yy_size_t i;
16401641

16411642
/* Get memory for full buffer, including space for trailing EOB's. */
16421643
n = (yy_size_t) (_yybytes_len + 2);
@@ -1678,7 +1679,7 @@ static void yynoreturn yy_fatal_error (const char* msg )
16781679
do \
16791680
{ \
16801681
/* Undo effects of setting up yytext. */ \
1681-
int yyless_macro_arg = (n); \
1682+
yy_size_t yyless_macro_arg = (n); \
16821683
YY_LESS_LINENO(yyless_macro_arg);\
16831684
yytext[yyleng] = (yy_hold_char); \
16841685
(yy_c_buf_p) = yytext + yyless_macro_arg; \
@@ -1718,7 +1719,7 @@ FILE *yyget_out (void)
17181719
/** Get the length of the current token.
17191720
*
17201721
*/
1721-
int yyget_leng (void)
1722+
yy_size_t yyget_leng (void)
17221723
{
17231724
return yyleng;
17241725
}

src/library/libjson.c

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,11 @@
22

33
static void loadCJSON(cJSON *json, int depth, expr_t **out, EXPRESSION_PARAMS()) {
44
cJSON *walk = json;
5-
int count = 0;
65
int i = 0;
76
keyValList_t *keyVals = NULL;
87
keyValList_t *keyValsHead = NULL;
98
int isArray = 0;
109

11-
/* Get number of elements */
12-
while (walk != NULL) {
13-
walk = walk->next;
14-
count++;
15-
}
16-
1710
walk = json;
1811
i = 0;
1912
while (walk != NULL) {

0 commit comments

Comments
 (0)