mirror of
https://gitlab.freedesktop.org/monado/monado.git
synced 2025-01-17 04:15:44 +00:00
u/json: Fix a -Wmaybe-uninitialized on GCC 10.1.0.
This commit is contained in:
parent
a5dc31359b
commit
261facd9f1
|
@ -163,12 +163,11 @@ u_json_get_vec3_array(const cJSON *json, struct xrt_vec3 *out_vec3)
|
|||
return false;
|
||||
}
|
||||
|
||||
float array[3];
|
||||
|
||||
if (cJSON_GetArraySize(json) != 3) {
|
||||
return false;
|
||||
}
|
||||
|
||||
float array[3] = {0, 0, 0};
|
||||
const cJSON *item = NULL;
|
||||
size_t i = 0;
|
||||
cJSON_ArrayForEach(item, json)
|
||||
|
|
Loading…
Reference in a new issue