tidy up for gcc
diff --git a/inc/qcbor/qcbor_decode.h b/inc/qcbor/qcbor_decode.h
index ecbcb44..484bc21 100644
--- a/inc/qcbor/qcbor_decode.h
+++ b/inc/qcbor/qcbor_decode.h
@@ -1231,7 +1231,7 @@
See also QCBORDecode_GetDoubleConvert() and QCBORDecode_GetDoubleConvertAll().
*/
-static void QCBORDecode_GetDouble(QCBORDecodeContext *pCtx, uint32_t uOptions, double *pValue);
+static void QCBORDecode_GetDouble(QCBORDecodeContext *pCtx, double *pValue);
static void QCBORDecode_GetDoubleInMapN(QCBORDecodeContext *pCtx, int64_t nLabel, double *pdValue);
@@ -2189,7 +2189,7 @@
QCBORDecode_GetDoubleConvertInternalInMapSZ(pMe, szLabel, uOptions, pdValue, &Item);
}
-inline static void QCBORDecode_GetDouble(QCBORDecodeContext *pMe, uint32_t uOptions, double *pValue)
+inline static void QCBORDecode_GetDouble(QCBORDecodeContext *pMe, double *pValue)
{
QCBORDecode_GetDoubleConvert(pMe, QCBOR_CONVERT_TYPE_FLOAT, pValue);
}
diff --git a/test/qcbor_decode_tests.c b/test/qcbor_decode_tests.c
index c74c429..16d2b2e 100644
--- a/test/qcbor_decode_tests.c
+++ b/test/qcbor_decode_tests.c
@@ -3929,7 +3929,8 @@
if(Item.uLabelType == QCBOR_TYPE_INT64) {
printf("%lld\n", Item.label.int64);
} else if(Item.uLabelType == QCBOR_TYPE_TEXT_STRING) {
- printf("\"%4.4s\"\n", Item.label.string.ptr);
+ // TODO: proper conversion to null-terminated string
+ printf("\"%4.4s\"\n", (const char *)Item.label.string.ptr);
}
}
}
@@ -4958,6 +4959,9 @@
QCBOREncode_CloseArray(&EC);
uErr = QCBOREncode_Finish(&EC, &Encoded);
+ if(uErr) {
+ Encoded = NULLUsefulBufC;
+ }
return Encoded;
}