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
195 unsigned long irq_flags;195 unsigned long irq_flags;
196 void *entry = NULL;196 void *entry = NULL;
197 int entry_size;197 int entry_size;
198 u64 val;198 u64 val = 0;
199 int len;199 int len;
200 200
201 entry = trace_alloc_entry(call, &entry_size);201 entry = trace_alloc_entry(call, &entry_size);