[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4DA4F201.9050609@gmail.com>
Date: Tue, 12 Apr 2011 17:44:49 -0700
From: "Justin P. Mattock" <justinmattock@...il.com>
To: Andrew Morton <akpm@...ux-foundation.org>
CC: rdunlap@...otime.net, linux-doc@...r.kernel.org,
linux-kernel@...r.kernel.org, Balbir Singh <balbir@...ibm.com>
Subject: Re: [RFC]Documentation:accounting:getdelays.c Fix: warning: variable āiā set but not used
On 04/12/2011 05:26 PM, Andrew Morton wrote:
> On Tue, 5 Apr 2011 09:02:50 -0700
> "Justin P. Mattock"<justinmattock@...il.com> wrote:
>
>> Keep in mind there is another warning with this file, but need am unsure what might be the best solution:
>> Documentation/accounting/getdelays.c: In function ___get_family_id___:
>> Documentation/accounting/getdelays.c:172:14: warning: variable ___rc___ set but not used [-Wunused-but-set-variable]
>
> this?
there was two warnings with that one..(or atleast that what I am seeing
over here).
>
>
> Subject: Documentation/accounting/getdelays.c: handle sendto() failures
> From: Andrew Morton<akpm@...ux-foundation.org>
>
> Documentation/accounting/getdelays.c: In function `get_family_id':
> Documentation/accounting/getdelays.c:172:14: warning: variable `rc' set but not used [-Wunused-but-set-variable]
>
> Reported-by: "Justin P. Mattock"<justinmattock@...il.com>
> Cc: Balbir Singh<balbir@...ibm.com>
> Signed-off-by: Andrew Morton<akpm@...ux-foundation.org>
> ---
>
> Documentation/accounting/getdelays.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff -puN Documentation/accounting/getdelays.c~documentation-accounting-getdelaysc-handle-sendto-failures Documentation/accounting/getdelays.c
> --- a/Documentation/accounting/getdelays.c~documentation-accounting-getdelaysc-handle-sendto-failures
> +++ a/Documentation/accounting/getdelays.c
> @@ -177,6 +177,8 @@ static int get_family_id(int sd)
> rc = send_cmd(sd, GENL_ID_CTRL, getpid(), CTRL_CMD_GETFAMILY,
> CTRL_ATTR_FAMILY_NAME, (void *)name,
> strlen(TASKSTATS_GENL_NAME)+1);
> + if (rc< 0)
> + return 0; /* sendto() failure? */
>
> rep_len = recv(sd,&ans, sizeof(ans), 0);
> if (ans.n.nlmsg_type == NLMSG_ERROR ||
> _
>
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists