summaryrefslogtreecommitdiffstats
path: root/src/sord_validate.c
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2024-11-13 11:33:54 -0500
committerDavid Robillard <d@drobilla.net>2024-11-13 11:49:59 -0500
commit613997e29aff202492ab368768c57857640b23b2 (patch)
tree02427ec3903d4c43fed4c36285e04cddf5a7a081 /src/sord_validate.c
parente71b831791c2a8820fe0580adfc555d5dc4b3a1a (diff)
downloadsord-613997e29aff202492ab368768c57857640b23b2.tar.gz
sord-613997e29aff202492ab368768c57857640b23b2.tar.bz2
sord-613997e29aff202492ab368768c57857640b23b2.zip
Avoid implicit signed/unsigned conversions
Diffstat (limited to 'src/sord_validate.c')
-rw-r--r--src/sord_validate.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/sord_validate.c b/src/sord_validate.c
index 51a3748..47c2051 100644
--- a/src/sord_validate.c
+++ b/src/sord_validate.c
@@ -583,7 +583,7 @@ check_instance(SordModel* model,
const SordNode* card =
sord_get(model, restriction, uris->owl_cardinality, NULL, NULL);
if (card) {
- const unsigned c = atoi((const char*)sord_node_get_string(card));
+ const unsigned c = (unsigned)atoi((const char*)sord_node_get_string(card));
if (values != c) {
st = errorf(quad,
"Property %s on %s has %u != %u values",
@@ -598,7 +598,8 @@ check_instance(SordModel* model,
const SordNode* minCard =
sord_get(model, restriction, uris->owl_minCardinality, NULL, NULL);
if (minCard) {
- const unsigned m = atoi((const char*)sord_node_get_string(minCard));
+ const unsigned m =
+ (unsigned)atoi((const char*)sord_node_get_string(minCard));
if (values < m) {
st = errorf(quad,
"Property %s on %s has %u < %u values",
@@ -613,7 +614,8 @@ check_instance(SordModel* model,
const SordNode* maxCard =
sord_get(model, restriction, uris->owl_maxCardinality, NULL, NULL);
if (maxCard) {
- const unsigned m = atoi((const char*)sord_node_get_string(maxCard));
+ const unsigned m =
+ (unsigned)atoi((const char*)sord_node_get_string(maxCard));
if (values < m) {
st = errorf(quad,
"Property %s on %s has %u > %u values",