For some versions of gcc (but not all) -Wall enables -Wmaybe-uninitialized.
While there are no uninitialized variables in QCBOR, warnings are still produced with some versions of gcc and with some optimization options for gcc. This just disables the warning entirely for qcbor_decode.c and notes where the warnings were checked.
It is well understood that -Wmaybe-uninitialized produces false positives.
QCBOR has been through full and proper static analysis so we know it doesn't have uninitialized variables. The cases that -Wmaybe-uninitialized complained about in one case (I can't reproduce them) have been checked and noted.
Note that just slamming initialization on to the variables to prevent the warnings is actually a bit dangerous because you don't know what the proper initialization value should be. You actually
have to read and understand the code to initialize correctly. That or confirm there is no
uninitialized variables. Both have been done in this case.
For some versions of gcc (but not all) -Wall enables -Wmaybe-uninitialized.
While there are no uninitialized variables in QCBOR, warnings are still produced with some versions of gcc and with some optimization options for gcc. This just disables the warning entirely for qcbor_decode.c and notes where the warnings were checked.
It is well understood that -Wmaybe-uninitialized produces false positives.
QCBOR has been through full and proper static analysis so we know it doesn't have uninitialized variables. The cases that -Wmaybe-uninitialized complained about in one case (I can't reproduce them) have been checked and noted.
Note that just slamming initialization on to the variables to prevent the warnings is actually a bit dangerous because you don't know what the proper initialization value should be. You actually have to read and understand the code to initialize correctly. That or confirm there is no uninitialized variables. Both have been done in this case.