Browse Source

Fix potential unitialized variable

Martijn Braam 1 year ago
parent
commit
92044e7233
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/pipeline.c

+ 1 - 1
src/pipeline.c

@@ -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;