lkml.org 
[lkml]   [2011]   [Jan]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH resend] fs/eventpoll.c: fix compilation warning
[cc Al Viro and Shawn Bohrer]
On 14/01/2011 11:52, Viresh Kumar wrote:
> This patch fixes following compilation warning
> fs/eventpoll.c:1119: warning: 'slack' may be used uninitialized in this function
>
> Signed-off-by: Viresh Kumar <viresh.kumar@st.com>
> ---
> fs/eventpoll.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/fs/eventpoll.c b/fs/eventpoll.c
> index 8cf0724..89b5e98 100644
> --- a/fs/eventpoll.c
> +++ b/fs/eventpoll.c
> @@ -1116,7 +1116,7 @@ static int ep_poll(struct eventpoll *ep, struct epoll_event __user *events,
> {
> int res, eavail, timed_out = 0;
> unsigned long flags;
> - long slack;
> + long uninitialized_var(slack);
> wait_queue_t wait;
> struct timespec end_time;
> ktime_t expires, *to = NULL;

Hi Viresh,

This is certainly the correct thing to do if timeout cannot be negative.

Al, Shawn

Can timeout be negative, and if so what does it mean?

Thanks,

Jack


\
 
 \ /
  Last update: 2011-01-14 14:09    [W:0.110 / U:0.096 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site