There was a bug that was caused by casting a `size_t` (64 bit) to a
32 bit vlaue.
The fix also contains a small refactoring extracting code into a
function.
Passing a `NULL` pointer to `memmove` results in undefined behavior.
When serializing a message we check if a payload is available.
Otherwise we don't move the payload to the buffer.
The 'master' branch was renamed to 'main' to reduce the use of harmful
language. Therefore, some scripts and descriptions were adjusted to the
new name of the default branch.
Words matter!
SonarCloud Scan does no longer support Java 11. Use
`sonarsource/sonarcloud-github-c-cpp` action to install sonarcloud and
the build-wrapper directly from the original vendor instead of a third
party.
Remove _Pragma directive responsible for silencing float-operation
warnings. Use standard library floating-point functions. Add tests to
test CBOR float conversions when float16 is disabled by
CBOR_NO_FLOAT16_ENCODING compile time switch.
Add CBOR_NO_FLOAT16_ENCODING to
"lwm2munittests_server_formats_no_float16" test variant.
The output of the sonar build wrapper was
overwritten when the tests where ran with
the wrapper. The wrapper is needed during
the build. But not for running the tests.
In some cases a random byte pattern was interpreted as a
boolean type. This happend when the conversion to a bool
was not successful but its value was logged anyway.
For some standard library functions (memcpy, memcmp ...) it's not
allowed to pass NULL-pointers as arguments. Therefore the pointers
are now checked before passing.
This change prevents cmake to modify the tinydtls submodule. This also
prevents that the tinydtls sources are marked with the GENERATED source
file propery. This had the consequence that the source were deleted when
cleaning the build directory.
This change only contains cosmetic changes to comply with the current
code format style for the SenML-CBOR contribution enforced by
clang-format and cmake-format.
This commit contains the contribution from Scott Bertin to support
SenML-CBOR with only changes resolving conflicts.
Signed-off-by: Scott Bertin <sbertin@telular.com>
Signed-off-by: Pascal Brogle <pascal.brogle@husqvarnagroup.com>
Signed-off-by: Marc Lasch <marc.lasch@husqvarnagroup.com>
registration_data_t is not freed if the server does not respond to the
connection message or the user decides to quit the (Wakaama) client
before the server respond.
This fixes#693.
The previous approach works only if the terminal is operating in cannonical mode
(input available line-by-line), which is not always true.
getline() ensures that commands are always read correctly.
Turn (almost) all warnings into errors to ensure no new warnings enter
the code base.
-Wcast-align is not an error because fixing the findings requires a bit
more work than what I am willing to do right now and the tinydtls yields
some findings.