lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4DA3AFB3.4020802@gmail.com>
Date:	Mon, 11 Apr 2011 18:49:39 -0700
From:	"Justin P. Mattock" <justinmattock@...il.com>
To:	Randy Dunlap <rdunlap@...otime.net>
CC:	linux-doc@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [RFC]Documentation:accounting:getdelays.c Fix: warning: variable ‘i’ set but not used

On 04/11/2011 11:56 AM, Randy Dunlap wrote:
> On Tue,  5 Apr 2011 09:02:50 -0700 Justin P. Mattock wrote:
>
>> The below patch takes care of the warning, but keep in mind am unsure if this is a correct way
>> to resolve this issue.
>> Documentation/accounting/getdelays.c: In function ‘main’:
>> Documentation/accounting/getdelays.c:436:7: warning: variable ‘i’ set but not used [-Wunused-but-set-variable]
>>
>> 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]
>
> Hi,
> Does -Wunused-but-set-variable require gcc 4.6.0?
>
>

not sure.. think its part of the whole "have gcc debug and clean things 
while it builds" feature with 4.6.0

>>   Signed-off-by: Justin P. Mattock<justinmattock@...il.com>
>>
>> ---
>>   Documentation/accounting/getdelays.c |    3 ---
>>   1 files changed, 0 insertions(+), 3 deletions(-)
>>
>> diff --git a/Documentation/accounting/getdelays.c b/Documentation/accounting/getdelays.c
>> index e9c7778..16e16d5 100644
>> --- a/Documentation/accounting/getdelays.c
>> +++ b/Documentation/accounting/getdelays.c
>> @@ -433,8 +433,6 @@ int main(int argc, char *argv[])
>>   	}
>>
>>   	do {
>> -		int i;
>> -
>>   		rep_len = recv(nl_sd,&msg, sizeof(msg), 0);
>>   		PRINTF("received %d bytes\n", rep_len);
>>
>> @@ -459,7 +457,6 @@ int main(int argc, char *argv[])
>>
>>   		na = (struct nlattr *) GENLMSG_DATA(&msg);
>>   		len = 0;
>> -		i = 0;
>>   		while (len<  rep_len) {
>>   			len += NLA_ALIGN(na->nla_len);
>>   			switch (na->nla_type) {
>> --
>
>
> ---
> ~Randy
> *** Remember to use Documentation/SubmitChecklist when testing your code ***
>

--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ