From 0033715a595d34e1e603a144c8af35c21587a9fb Mon Sep 17 00:00:00 2001 From: iceman1001 Date: Tue, 24 Mar 2020 13:35:33 +0100 Subject: [PATCH] cppchecker --- client/tinycbor/cborpretty.c | 4 ++-- client/tinycbor/cbortojson.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/client/tinycbor/cborpretty.c b/client/tinycbor/cborpretty.c index 775d90925..71f05522f 100644 --- a/client/tinycbor/cborpretty.c +++ b/client/tinycbor/cborpretty.c @@ -488,14 +488,14 @@ static CborError value_to_pretty(CborStreamFunction stream, void *out, CborValue case CborFloatType: cbor_value_get_float(it, &f); val = f; - suffix = flags & CborPrettyNumericEncodingIndicators ? "_2" : "f"; + suffix = (flags & CborPrettyNumericEncodingIndicators) ? "_2" : "f"; } else if (false) { uint16_t f16; case CborHalfFloatType: #ifndef CBOR_NO_HALF_FLOAT_TYPE cbor_value_get_half_float(it, &f16); val = decode_half(f16); - suffix = flags & CborPrettyNumericEncodingIndicators ? "_1" : "f16"; + suffix = (flags & CborPrettyNumericEncodingIndicators) ? "_1" : "f16"; #else (void)f16; err = CborErrorUnsupportedType; diff --git a/client/tinycbor/cbortojson.c b/client/tinycbor/cbortojson.c index 3ea90cee8..8d39303bc 100644 --- a/client/tinycbor/cbortojson.c +++ b/client/tinycbor/cbortojson.c @@ -146,7 +146,7 @@ * the keys for the metadata clash with existing keys in the JSON map. */ -extern FILE *open_memstream(char **bufptr, size_t *sizeptr); +extern FILE *open_memstream(char **bufptr, size_t *lenptr); enum ConversionStatusFlags { TypeWasNotNative = 0x100, /* anything but strings, boolean, null, arrays and maps */