Fix potential unitialized variable

This commit is contained in:
Martijn Braam
2023-12-02 20:26:11 +01:00
parent c889483b9c
commit 92044e7233

View File

@@ -101,7 +101,7 @@ load_entity_ids(libmegapixels_camera *camera)
for (int i = 0; i < topology.num_links; i++) {
if (links[i].flags & MEDIA_LNK_FL_ENABLED && !(links[i].flags & MEDIA_LNK_FL_IMMUTABLE)) {
uint32_t source_entity, sink_entity;
uint32_t source_entity = 0, sink_entity = 0;
for (int j = 0; j < topology.num_pads; j++) {
if (pads[j].id == links[i].source_id) {
source_entity = pads[j].entity_id;