bug-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 1/2] device/net_io.c: add comments and initialize hash_entp


From: Justus Winter
Subject: Re: [PATCH 1/2] device/net_io.c: add comments and initialize hash_entp
Date: Mon, 02 Dec 2013 10:37:08 +0100
User-agent: alot/0.3.4

Quoting Marin Ramesa (2013-12-02 09:14:35)
> Samuel Thibault wrote:
> > It doesn't seem so clear that it's actually always properly initialized.
> > We also need a comment explaining why it always is.
> 
> * device/net_io.c (hash_entp): Initialize and add a comment saying why this 
> was done.
> 
> ---
>  device/net_io.c | 7 +++++--
>  1 file changed, 5 insertions(+), 2 deletions(-)
> 
> diff --git a/device/net_io.c b/device/net_io.c
> index 1958840..afa95c5 100644
> --- a/device/net_io.c
> +++ b/device/net_io.c
> @@ -1158,14 +1158,17 @@ net_set_filter(ifp, rcv_port, priority, filter, 
> filter_count)
>      net_rcv_port_t             infp, my_infp;
>      net_rcv_port_t             nextfp;
>      net_hash_header_t          hhp;
> -    net_hash_entry_t           entp, hash_entp;
> +    net_hash_entry_t           entp; 
>      net_hash_entry_t           *head, nextentp;
>      queue_entry_t              dead_infp, dead_entp;
>      int                                i;
>      int                                ret, is_new_infp;
>      io_return_t                        rval;
>      boolean_t                  in, out;
> -
> +    net_hash_entry_t           hash_entp = hash_entp; /* Quiet GCC warning 
> about uninitialized variable.

The other day you were fixing this kind of code, now you're
introducing it. Maybe there's a better way to silence this warning,
maybe some attribute.

Justus



reply via email to

[Prev in Thread] Current Thread [Next in Thread]