Simplify wcast qual suppression (#167)
This change doesn't result in any change to the object code.
* Use simple way to suppress Wcast-qual warning
This method does not require pragmas, only cast over uintptr_t.
* Fix clang Wstrict-prototypes warning
A function declaration without a prototype is deprecated in all versions of C
Co-authored-by: Laurence Lundblade <laurencelundblade@users.noreply.github.com>
diff --git a/test/float_tests.c b/test/float_tests.c
index 3484084..2bf5fad 100644
--- a/test/float_tests.c
+++ b/test/float_tests.c
@@ -127,7 +127,7 @@
}
-int32_t HalfPrecisionDecodeBasicTests()
+int32_t HalfPrecisionDecodeBasicTests(void)
{
UsefulBufC HalfPrecision = UsefulBuf_FROM_BYTE_ARRAY_LITERAL(spExpectedHalf);
@@ -247,7 +247,7 @@
-int32_t HalfPrecisionAgainstRFCCodeTest()
+int32_t HalfPrecisionAgainstRFCCodeTest(void)
{
for(uint32_t uHalfP = 0; uHalfP < 0xffff; uHalfP += 60) {
unsigned char x[2];
@@ -441,7 +441,7 @@
#define MAKE_DOUBLE(x) UsefulBufUtil_CopyUint64ToDouble(x)
-int32_t DoubleAsSmallestTest()
+int32_t DoubleAsSmallestTest(void)
{
UsefulBuf_MAKE_STACK_UB(EncodedHalfsMem, sizeof(spExpectedSmallest));
@@ -700,7 +700,7 @@
0x18, 0x6A,
0xFA, 0x00, 0x00, 0x00, 0x00};
-int32_t GeneralFloatEncodeTests()
+int32_t GeneralFloatEncodeTests(void)
{
UsefulBufC ExpectedFloats;
#ifndef QCBOR_DISABLE_PREFERRED_FLOAT
@@ -774,7 +774,7 @@
#endif /* USEFULBUF_DISABLE_ALL_FLOAT */
-int32_t GeneralFloatDecodeTests()
+int32_t GeneralFloatDecodeTests(void)
{
QCBORItem Item;
QCBORError uErr;