summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorDavid Carlier <devnexen@gmail.com>2019-07-09 22:08:31 +0100
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2019-08-05 16:53:34 +0900
commit9ecc117180a8517e661360781db79fd71f4de78c (patch)
tree684baa3854189ccb8f7afc0f61e3a34bb4812e84 /ext
parentd28363334a332e2517acdba4412c252758add926 (diff)
downloadpsych-9ecc117180a8517e661360781db79fd71f4de78c.zip
yaml few build warning fixes
Closes: https://github.com/ruby/ruby/pull/2283
Diffstat (limited to 'ext')
-rw-r--r--ext/psych/yaml/api.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/ext/psych/yaml/api.c b/ext/psych/yaml/api.c
index ee170d8..03c1379 100644
--- a/ext/psych/yaml/api.c
+++ b/ext/psych/yaml/api.c
@@ -840,7 +840,7 @@ yaml_scalar_event_initialize(yaml_event_t *event,
}
if (length < 0) {
- length = strlen((char *)value);
+ length = (int)strlen((char *)value);
}
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 (length < 0) {
- length = strlen((char *)value);
+ length = (int)strlen((char *)value);
}
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);
if (!PUSH(&context, document->nodes, node)) goto error;
- return document->nodes.top - document->nodes.start;
+ return (int)(document->nodes.top - document->nodes.start);
error:
yaml_free(tag_copy);
@@ -1273,7 +1273,7 @@ yaml_document_add_sequence(yaml_document_t *document,
style, mark, mark);
if (!PUSH(&context, document->nodes, node)) goto error;
- return document->nodes.top - document->nodes.start;
+ return (int)(document->nodes.top - document->nodes.start);
error:
STACK_DEL(&context, items);
@@ -1318,7 +1318,7 @@ yaml_document_add_mapping(yaml_document_t *document,
style, mark, mark);
if (!PUSH(&context, document->nodes, node)) goto error;
- return document->nodes.top - document->nodes.start;
+ return (int)(document->nodes.top - document->nodes.start);
error:
STACK_DEL(&context, pairs);