QCBOR: Quiet static analyzers; add bigfloat support; documentation improvements
Refined use of types, particular integer types and their signedness so there
are fewer warnings from static analyzers. Added casts to make implicit
type conversions explicit and more clear for code reader. No actual bugs
or vulnerabilities where found by the static analyzer but a lot of lines
were changed.
Cleaner handling of too-long bstr and tstr error condition when decoding.
Add support for bigfloats and decimal fractions -- all of RFC 7049 is now
supported except duplicate detection when decoding maps and some of
strict mode. Dead-stripping and/or linking through a .a file will
automatically leave out the added code on the encoder side.
bytes or so of code on the decode side
Documentation corrections and improved code formatting, fewer
long lines, spelling... A lot of lines where change for this.
Repair a few tests that weren't testing what they were supposed
to be testing.
Change-Id: I4c9c56c1ee16812eac7a5c2f2ba0d896f3f1b5ae
Signed-off-by: Laurence Lundblade <lgl@securitytheory.com>
diff --git a/lib/ext/qcbor/test/float_tests.h b/lib/ext/qcbor/test/float_tests.h
index b7174c8..f777156 100644
--- a/lib/ext/qcbor/test/float_tests.h
+++ b/lib/ext/qcbor/test/float_tests.h
@@ -1,23 +1,25 @@
/*==============================================================================
float_tests.h -- tests for float and conversion to/from half-precision
- Copyright (c) 2018-2019, Laurence Lundblade. All rights reserved.
+ Copyright (c) 2018-2020, Laurence Lundblade. All rights reserved.
SPDX-License-Identifier: BSD-3-Clause
See BSD-3-Clause license in README.md
Created on 9/19/18
- ==============================================================================*/
+ =============================================================================*/
#ifndef float_tests_h
#define float_tests_h
-int HalfPrecisionDecodeBasicTests(void);
+#include <stdint.h>
-int DoubleAsSmallestTest(void);
+int32_t HalfPrecisionDecodeBasicTests(void);
-int HalfPrecisionAgainstRFCCodeTest(void);
+int32_t DoubleAsSmallestTest(void);
+
+int32_t HalfPrecisionAgainstRFCCodeTest(void);
#endif /* float_tests_h */