Fix uninitialized variable compiler warning in VGetNextConsume (#108)
Pass the address of pDecodedItem->uNextNestLevel directly to
ConsumeItem.
diff --git a/src/qcbor_decode.c b/src/qcbor_decode.c
index b1cec82..801761f 100644
--- a/src/qcbor_decode.c
+++ b/src/qcbor_decode.c
@@ -2767,13 +2767,11 @@
void QCBORDecode_VGetNextConsume(QCBORDecodeContext *pMe, QCBORItem *pDecodedItem)
{
- uint8_t uNextNestLevel;
-
QCBORDecode_VGetNext(pMe, pDecodedItem);
if(pMe->uLastError == QCBOR_SUCCESS) {
- pMe->uLastError = (uint8_t)ConsumeItem(pMe, pDecodedItem, &uNextNestLevel);
- pDecodedItem->uNextNestLevel = uNextNestLevel;
+ pMe->uLastError = (uint8_t)ConsumeItem(pMe, pDecodedItem,
+ &pDecodedItem->uNextNestLevel);
}
}