Fix build issue caused by implicit signed type in JSON schema validator #385
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When attempting to build
libocpp
on macOS Sonoma 14.2.1 (23C71) (on a Apple 2023 MacBook Pro with M2 Pro CPU), I immediately run into an error withsmtp-address-validator.cpp.o
from pboettch/json-schema-validator (also known asnlohmann_json_schema_validator
in EVerest CMake files). The error is due to an array ofchar
s in their2.2.0
release that contains negative values but is not explicitly declared to besigned
. (See the details block at the end of this message for the complete error output.)Using the bare
char
type instead ofsigned char
orunsigned char
with numeric values is generally considered a bad practice that limits portability (see, for instance, the SEI CERT C Coding Standard), and the authors of pboettch/json-schema-validator have since changed this variable to be asigned char
array for their2.3.0
release.This PR updates the pboettch/json-schema-validator dependency in our
dependencies.yaml
to the newer2.3.0
release, makinglibocpp
, resolving this compilation issue.Full Error Log