History

tracing: Initialize val to zero in parse_entry of inject code

gcc produces a variable may be uninitialized warning for "val" in parse_entry(). This is really a false positive, but the code is subtle enough to just initialize val to zero and it's not a fast path to worry about it. Marked for stable to remove the warning in the stable trees as well.

Steven Rostedt (VMware) committed 6 years ago

Commit 02f4e011 parent fe6e0961 file · +1 −1Browse files

Unified · Split

kernel/trace/trace_events_inject.c+1−1
@@ -195,7 +195,7 @@ static int parse_entry(char *str, struct trace_event_call *call, void **pentry) · 194 unmodified lines
195195 unsigned long irq_flags;
196196 void *entry = NULL;
197197 int entry_size;
198− u64 val;
198+ u64 val = 0;
199199 int len;
200200
201201 entry = trace_alloc_entry(call, &entry_size);

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t