Skip to content

Commit 20c2734

Browse files
committed
Fixed issue with wrong floating point literal
1 parent 6d3ec4c commit 20c2734

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

components/TARGET_PSA/services/attestation/qcbor/test/UsefulBuf_Tests.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -681,11 +681,11 @@ const char *UBUTest_CopyUtil()
681681
return "CopyFloatToUint32 failed";
682682
}
683683

684-
if(UsefulBufUtil_CopyDoubleToUint64(4e-40F) != 0X37C16C2800000000ULL) {
684+
if(UsefulBufUtil_CopyDoubleToUint64(4e-40L) != 0X37C16C2800000000ULL) {
685685
return "CopyDoubleToUint64 failed";
686686
}
687687

688-
if(UsefulBufUtil_CopyUint64ToDouble(0X37C16C2800000000ULL) != 4e-40F) {
688+
if(UsefulBufUtil_CopyUint64ToDouble(0X37C16C2800000000ULL) != 4e-40L) {
689689
return "CopyUint64ToDouble failed";
690690
}
691691

components/TARGET_PSA/services/attestation/qcbor/test/float_tests.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -379,7 +379,7 @@ int DoubleAsSmallestTest()
379379
// 70 # text(16)
380380
// 7375626E6F726D616C2073696E676C65 # "subnormal single"
381381
// FB 37C16C2800000000 # primitive(4017611261645684736)
382-
QCBOREncode_AddDoubleAsSmallestToMap(&EC, "subnormal single", 4e-40F);
382+
QCBOREncode_AddDoubleAsSmallestToMap(&EC, "subnormal single", 4e-40L);
383383

384384
// 03 # unsigned(3)
385385
// F9 C000 # primitive(49152)

0 commit comments

Comments
 (0)