Ver código fonte

Fix potential unitialized variable

Martijn Braam 6 meses atrás
pai
commit
92044e7233
1 arquivos alterados com 1 adições e 1 exclusões
  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;