json-c: merge an upstream fix for a compiler warning (fixes #19187)