mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
yaml few build warning fixes
Closes: https://github.com/ruby/ruby/pull/2283
This commit is contained in:
parent
b6cfacc85d
commit
2d189a6721
1 changed files with 5 additions and 5 deletions
|
@ -840,7 +840,7 @@ yaml_scalar_event_initialize(yaml_event_t *event,
|
||||||
}
|
}
|
||||||
|
|
||||||
if (length < 0) {
|
if (length < 0) {
|
||||||
length = strlen((char *)value);
|
length = (int)strlen((char *)value);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!yaml_check_utf8(value, length)) goto error;
|
if (!yaml_check_utf8(value, length)) goto error;
|
||||||
|
@ -1216,7 +1216,7 @@ yaml_document_add_scalar(yaml_document_t *document,
|
||||||
if (!tag_copy) goto error;
|
if (!tag_copy) goto error;
|
||||||
|
|
||||||
if (length < 0) {
|
if (length < 0) {
|
||||||
length = strlen((char *)value);
|
length = (int)strlen((char *)value);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!yaml_check_utf8(value, length)) goto error;
|
if (!yaml_check_utf8(value, length)) goto error;
|
||||||
|
@ -1228,7 +1228,7 @@ yaml_document_add_scalar(yaml_document_t *document,
|
||||||
SCALAR_NODE_INIT(node, tag_copy, value_copy, length, style, mark, mark);
|
SCALAR_NODE_INIT(node, tag_copy, value_copy, length, style, mark, mark);
|
||||||
if (!PUSH(&context, document->nodes, node)) goto error;
|
if (!PUSH(&context, document->nodes, node)) goto error;
|
||||||
|
|
||||||
return document->nodes.top - document->nodes.start;
|
return (int)(document->nodes.top - document->nodes.start);
|
||||||
|
|
||||||
error:
|
error:
|
||||||
yaml_free(tag_copy);
|
yaml_free(tag_copy);
|
||||||
|
@ -1273,7 +1273,7 @@ yaml_document_add_sequence(yaml_document_t *document,
|
||||||
style, mark, mark);
|
style, mark, mark);
|
||||||
if (!PUSH(&context, document->nodes, node)) goto error;
|
if (!PUSH(&context, document->nodes, node)) goto error;
|
||||||
|
|
||||||
return document->nodes.top - document->nodes.start;
|
return (int)(document->nodes.top - document->nodes.start);
|
||||||
|
|
||||||
error:
|
error:
|
||||||
STACK_DEL(&context, items);
|
STACK_DEL(&context, items);
|
||||||
|
@ -1318,7 +1318,7 @@ yaml_document_add_mapping(yaml_document_t *document,
|
||||||
style, mark, mark);
|
style, mark, mark);
|
||||||
if (!PUSH(&context, document->nodes, node)) goto error;
|
if (!PUSH(&context, document->nodes, node)) goto error;
|
||||||
|
|
||||||
return document->nodes.top - document->nodes.start;
|
return (int)(document->nodes.top - document->nodes.start);
|
||||||
|
|
||||||
error:
|
error:
|
||||||
STACK_DEL(&context, pairs);
|
STACK_DEL(&context, pairs);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue