Skip to content

Commit

Permalink
debug: debug_stream_slot: Fix couple of warnings
Browse files Browse the repository at this point in the history
Fix one "unused variable" and one "may be used uninitialized"
warning. The maybe used is false positive, but still better to silence
it.

Signed-off-by: Jyri Sarha <jyri.sarha@linux.intel.com>
  • Loading branch information
Jyri Sarha authored and lgirdwood committed Sep 19, 2024
1 parent ebfbf4d commit cb1b7d0
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/debug/debug_stream/debug_stream_slot.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ struct debug_stream_circular_buf *
debug_stream_get_circular_buffer(struct debug_stream_section_descriptor *desc, unsigned int core)
{
struct debug_stream_slot_hdr *hdr = debug_stream_get_slot();
void *ptr;

if (hdr->hdr.magic != DEBUG_STREAM_IDENTIFIER) {
LOG_ERR("Debug stream slot not initialized.");
Expand All @@ -47,7 +46,7 @@ debug_stream_get_circular_buffer(struct debug_stream_section_descriptor *desc, u

int debug_stream_slot_send_record(struct debug_stream_record *rec)
{
struct debug_stream_section_descriptor desc;
struct debug_stream_section_descriptor desc = { 0 };
struct debug_stream_circular_buf *buf =
debug_stream_get_circular_buffer(&desc, arch_proc_id());
uint32_t record_size = rec->size_words;
Expand Down Expand Up @@ -134,7 +133,7 @@ static int debug_stream_slot_init(void)
offset += section_size;
}
for (i = 0; i < CONFIG_MP_MAX_NUM_CPUS; i++) {
struct debug_stream_section_descriptor desc;
struct debug_stream_section_descriptor desc = { 0 };
struct debug_stream_circular_buf *buf =
debug_stream_get_circular_buffer(&desc, i);

Expand Down

0 comments on commit cb1b7d0

Please sign in to comment.