Fix problems detected by CodeQL static analysis
authorCharles Giessen <charles@lunarg.com>
Thu, 28 Sep 2023 19:08:46 +0000 (13:08 -0600)
committerCharles Giessen <46324611+charles-lunarg@users.noreply.github.com>
Mon, 2 Oct 2023 20:17:44 +0000 (14:17 -0600)
commit0a5fdecfbd2b3de7b0e16a6feb75530a0854c09e
treee5a5e7c301a7039727df1467bd84ac72622de102
parentd23320bc2464abbbadf45c8d539b9869af95b54d
Fix problems detected by CodeQL static analysis

3 types of issues were found:
* Incorrect format specifiers
* Not providing required format specifies
* Using alloca in a loop

There are multiple instances of alloca in loops, but to fix them would
require significant refactoring. This commit includes 1 move of alloca inside
a for loop to the outside, but this is because the logic was redoing work
in a for loop that could have been done once at the start of the function.
loader/cJSON.c
loader/loader.c
loader/settings.c
loader/settings.h