@@ -1103,7 +1103,7 @@ yaml_parser_save_simple_key(yaml_parser_t *parser)
1103
1103
*/
1104
1104
1105
1105
int required = (!parser -> flow_level
1106
- && parser -> indent == parser -> mark .column );
1106
+ && parser -> indent == ( int ) parser -> mark .column );
1107
1107
1108
1108
/*
1109
1109
* A simple key is required only when it is the first token in the current
@@ -1120,7 +1120,8 @@ yaml_parser_save_simple_key(yaml_parser_t *parser)
1120
1120
{
1121
1121
yaml_simple_key_t simple_key = { 1 , required ,
1122
1122
parser -> tokens_parsed + parser -> tokens .tail - parser -> tokens .head ,
1123
- parser -> mark };
1123
+ { 0 , 0 , 0 } };
1124
+ simple_key .mark = parser -> mark ;
1124
1125
1125
1126
if (!yaml_parser_remove_simple_key (parser )) return 0 ;
1126
1127
@@ -2569,7 +2570,7 @@ yaml_parser_scan_tag_uri(yaml_parser_t *parser, int directive,
2569
2570
2570
2571
/* Resize the string to include the head. */
2571
2572
2572
- while (string .end - string .start <= length ) {
2573
+ while (string .end - string .start <= ( int ) length ) {
2573
2574
if (!yaml_string_extend (& string .start , & string .pointer , & string .end )) {
2574
2575
parser -> error = YAML_MEMORY_ERROR ;
2575
2576
goto error ;
@@ -2851,7 +2852,7 @@ yaml_parser_scan_block_scalar(yaml_parser_t *parser, yaml_token_t *token,
2851
2852
2852
2853
if (!CACHE (parser , 1 )) goto error ;
2853
2854
2854
- while (parser -> mark .column == indent && !IS_Z (parser -> buffer ))
2855
+ while (( int ) parser -> mark .column == indent && !IS_Z (parser -> buffer ))
2855
2856
{
2856
2857
/*
2857
2858
* We are at the beginning of a non-empty line.
@@ -2958,18 +2959,18 @@ yaml_parser_scan_block_scalar_breaks(yaml_parser_t *parser,
2958
2959
2959
2960
if (!CACHE (parser , 1 )) return 0 ;
2960
2961
2961
- while ((!* indent || parser -> mark .column < * indent )
2962
+ while ((!* indent || ( int ) parser -> mark .column < * indent )
2962
2963
&& IS_SPACE (parser -> buffer )) {
2963
2964
SKIP (parser );
2964
2965
if (!CACHE (parser , 1 )) return 0 ;
2965
2966
}
2966
2967
2967
- if (parser -> mark .column > max_indent )
2968
- max_indent = parser -> mark .column ;
2968
+ if (( int ) parser -> mark .column > max_indent )
2969
+ max_indent = ( int ) parser -> mark .column ;
2969
2970
2970
2971
/* Check for a tab character messing the intendation. */
2971
2972
2972
- if ((!* indent || parser -> mark .column < * indent )
2973
+ if ((!* indent || ( int ) parser -> mark .column < * indent )
2973
2974
&& IS_TAB (parser -> buffer )) {
2974
2975
return yaml_parser_set_scanner_error (parser , "while scanning a block scalar" ,
2975
2976
start_mark , "found a tab character where an intendation space is expected" );
@@ -3098,7 +3099,7 @@ yaml_parser_scan_flow_scalar(yaml_parser_t *parser, yaml_token_t *token,
3098
3099
3099
3100
else if (!single && CHECK (parser -> buffer , '\\' ))
3100
3101
{
3101
- int code_length = 0 ;
3102
+ size_t code_length = 0 ;
3102
3103
3103
3104
if (!STRING_EXTEND (parser , string )) goto error ;
3104
3105
@@ -3207,7 +3208,7 @@ yaml_parser_scan_flow_scalar(yaml_parser_t *parser, yaml_token_t *token,
3207
3208
if (code_length )
3208
3209
{
3209
3210
unsigned int value = 0 ;
3210
- int k ;
3211
+ size_t k ;
3211
3212
3212
3213
/* Scan the character value. */
3213
3214
@@ -3495,7 +3496,7 @@ yaml_parser_scan_plain_scalar(yaml_parser_t *parser, yaml_token_t *token)
3495
3496
{
3496
3497
/* Check for tab character that abuse intendation. */
3497
3498
3498
- if (leading_blanks && parser -> mark .column < indent
3499
+ if (leading_blanks && ( int ) parser -> mark .column < indent
3499
3500
&& IS_TAB (parser -> buffer )) {
3500
3501
yaml_parser_set_scanner_error (parser , "while scanning a plain scalar" ,
3501
3502
start_mark , "found a tab character that violate intendation" );
@@ -3533,7 +3534,7 @@ yaml_parser_scan_plain_scalar(yaml_parser_t *parser, yaml_token_t *token)
3533
3534
3534
3535
/* Check intendation level. */
3535
3536
3536
- if (!parser -> flow_level && parser -> mark .column < indent )
3537
+ if (!parser -> flow_level && ( int ) parser -> mark .column < indent )
3537
3538
break ;
3538
3539
}
3539
3540
0 commit comments