kernel/async.c: fixing compilation warnings
PATCH RESEND 1/1 kernel/async.c: fixing compilation warnings
This patch fixes following compilation warnings:
270:10: warning: ‘starttime.tv64’ may be used uninitialized in this function 122:10: warning: ‘calltime.tv64’ may be used uninitialized in this function
--- kernel/async.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
kernel/async.c +2 -2
@@ -119,7 +119,7 @@ static void async_run_entry_fn(struct work_struct *work)struct async_entry *entry = container_of(work, struct async_entry, work);unsigned long flags; -ktime_t calltime, delta, rettime; +ktime_t uninitialized_var (calltime ), delta, rettime;/* 1) move self to the running queue */ spin_lock_irqsave (&async_lock, flags);
@@ -267,7 +267,7 @@ EXPORT_SYMBOL_GPL(async_synchronize_full_domain);void async_synchronize_cookie_domain (async_cookie_t cookie,struct list_head *running) { -ktime_t starttime, delta, endtime; +ktime_t uninitialized_var (starttime ), delta, endtime;if (initcall_debug && system_state ==SYSTEM_BOOTING ) {printk ("async_waiting @ %i\n" ,task_pid_nr (current));
Signature · 1 line
1.7.2.2
[cc Arjan van de Ven]
Quoted 5 lines · Viresh Kumar
This patch fixes following compilation warnings:
270:10: warning: ‘starttime.tv64’ may be used uninitialized in this function 122:10: warning: ‘calltime.tv64’ may be used uninitialized in this functionSigned-off-by Viresh Kumar <[email protected]>
Looks good to me
Quoted 26 lines
--- kernel/async.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)kernel/async.c +2
-2@@ -119,7 +119,7 @@ static void async_run_entry_fn(struct work_struct *work)struct async_entry *entry = container_of(work, struct async_entry, work);unsigned long flags; -ktime_t calltime, delta, rettime; +ktime_t uninitialized_var (calltime ), delta, rettime;/* 1) move self to the running queue */ spin_lock_irqsave (&async_lock, flags);@@ -267,7 +267,7 @@ EXPORT_SYMBOL_GPL(async_synchronize_full_domain);void async_synchronize_cookie_domain (async_cookie_t cookie,struct list_head *running) { -ktime_t starttime, delta, endtime; +ktime_t uninitialized_var (starttime ), delta, endtime;if (initcall_debug && system_state ==SYSTEM_BOOTING ) {printk ("async_waiting @ %i\n" ,task_pid_nr (current));
Quoted 1 line · Jack Stone
rning: ‘calltime.tv64’ may be used uninitialized in this function
which is clearly a.. gcc funny to be honest. it's a false positive by any stretch.
Quoted 1 line
Quoted 1 line
Quoted 6 lines · Arjan van de Ven
Quoted 1 line · Jack Stone
rning: ‘calltime.tv64’ may be used uninitialized in this function
which is clearly a.. gcc funny to be honest. it's a false positive by any stretch.
Agreed. Who should merge this?
Thanks,
Jack
Quoted 7 lines · Jack Stone
Quoted 5 lines · Arjan van de Ven
Quoted 1 line · Jack Stone
rning: ‘calltime.tv64’ may be used uninitialized in this function
which is clearly a.. gcc funny to be honest. it's a false positive by any stretch.
Agreed. Who should merge this?
should it be?
traditionally we have shied away for workarounds for false positives from gcc.....
Quoted 5 lines · Arjan van de Ven
Quoted 4 lines · Jack Stone
Quoted 3 lines · Arjan van de Ven
Quoted 1 line · Jack Stone
rning: ‘calltime.tv64’ may be used uninitialized in this function
which is clearly a.. gcc funny to be honest. it's a false positive
Quoted 8 lines
by
Quoted 3 lines
Quoted 2 lines
any stretch.
Agreed. Who should merge this?
should it be?
traditionally we have shied away for workarounds for false positives from gcc.....
I don't mind. I thought that was what uninitalized_var() was for.
Thanks,
Jack
Signature · 1 line
Sent from my Android phone with K-9 Mail. Please excuse my brevity.