]> git.ipfire.org Git - thirdparty/json-c.git/commitdiff
Issue #842 - fix one particular sign conversion warning.
authorEric Haszlakiewicz <erh+git@nimenees.com>
Thu, 30 Nov 2023 13:59:13 +0000 (13:59 +0000)
committerEric Haszlakiewicz <erh+git@nimenees.com>
Thu, 30 Nov 2023 13:59:13 +0000 (13:59 +0000)
There are many others that show up if we were to add -Wsign-conversions,
but this is the only one using a literal constant.

json_pointer.c

index 0ac8aaaaf0497ec2c484651f4dcb0635d506a974..6e5609d7005c648966a4e79047d286b69f3754e3 100644 (file)
@@ -231,7 +231,7 @@ int json_pointer_get_internal(struct json_object *obj, const char *path,
                res->parent = NULL;
                res->obj = obj;
                res->key_in_parent = NULL;
-               res->index_in_parent = -1;
+               res->index_in_parent = UINT32_MAX;
                return 0;
        }