summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/sord.c6
-rw-r--r--src/sord_validate.c8
2 files changed, 8 insertions, 6 deletions
diff --git a/src/sord.c b/src/sord.c
index d605826..4e5934e 100644
--- a/src/sord.c
+++ b/src/sord.c
@@ -635,8 +635,8 @@ sord_best_index(SordModel* sord,
{
const bool graph_search = (pat[TUP_G] != 0);
- const unsigned sig = (pat[0] ? 1 : 0) * 0x100 + (pat[1] ? 1 : 0) * 0x010 +
- (pat[2] ? 1 : 0) * 0x001;
+ const unsigned sig = (pat[0] ? 1 : 0) * 0x100U + (pat[1] ? 1 : 0) * 0x010U +
+ (pat[2] ? 1 : 0) * 0x001U;
SordOrder good[2] = {(SordOrder)-1, (SordOrder)-1};
@@ -717,7 +717,7 @@ sord_new(SordWorld* world, unsigned indices, bool graphs)
const int* const ordering = orderings[i];
const int* const g_ordering = orderings[i + (NUM_ORDERS / 2)];
- if (indices & (1 << i)) {
+ if (indices & (1U << i)) {
model->indices[i] =
zix_btree_new(NULL, sord_quad_compare, (void*)ordering);
if (graphs) {
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",