* [LTP] [PATCH 07/21] cgroup/getdelays: Squish uninitialized variable warning for old GCC compilers
@ 2012-01-03 11:02 Markos Chandras
2012-01-03 19:30 ` Garrett Cooper
0 siblings, 1 reply; 4+ messages in thread
From: Markos Chandras @ 2012-01-03 11:02 UTC (permalink / raw)
To: ltp-list
[-- Attachment #1: Type: text/plain, Size: 102 bytes --]
Hi, please review the attached patch. It is a trivial fix for slightly
old GCC versions.
--
markos
[-- Attachment #2: 0007-cgroup-getdelays-Squish-uninitialized-variable-warni.patch --]
[-- Type: text/plain, Size: 923 bytes --]
From 9a47290369456d5406845b0d5c37b1577e55ef11 Mon Sep 17 00:00:00 2001
From: Markos Chandras <markos.chandras@imgtec.com>
Date: Thu, 22 Dec 2011 12:07:30 +0000
Subject: [PATCH 07/21] cgroup/getdelays: Squish uninitialized variable warning for old GCC compilers
Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
---
testcases/kernel/controllers/cgroup/getdelays.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/testcases/kernel/controllers/cgroup/getdelays.c b/testcases/kernel/controllers/cgroup/getdelays.c
index da735b2..5c79423 100644
--- a/testcases/kernel/controllers/cgroup/getdelays.c
+++ b/testcases/kernel/controllers/cgroup/getdelays.c
@@ -263,7 +263,7 @@ void print_ioacct(struct taskstats *t)
int main(int argc, char *argv[])
{
- int c, rc, rep_len, aggr_len, len2, cmd_type;
+ int c, rc, rep_len, aggr_len, len2, cmd_type = 0;
__u16 id;
__u32 mypid;
--
1.7.1
[-- Attachment #3: Type: text/plain, Size: 355 bytes --]
------------------------------------------------------------------------------
Write once. Port to many.
Get the SDK and tools to simplify cross-platform app development. Create
new or port existing apps to sell to consumers worldwide. Explore the
Intel AppUpSM program developer opportunity. appdeveloper.intel.com/join
http://p.sf.net/sfu/intel-appdev
[-- Attachment #4: Type: text/plain, Size: 155 bytes --]
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [LTP] [PATCH 07/21] cgroup/getdelays: Squish uninitialized variable warning for old GCC compilers
2012-01-03 11:02 [LTP] [PATCH 07/21] cgroup/getdelays: Squish uninitialized variable warning for old GCC compilers Markos Chandras
@ 2012-01-03 19:30 ` Garrett Cooper
2012-01-04 14:30 ` Cyril Hrubis
0 siblings, 1 reply; 4+ messages in thread
From: Garrett Cooper @ 2012-01-03 19:30 UTC (permalink / raw)
To: Markos Chandras; +Cc: ltp-list
On Tue, Jan 3, 2012 at 3:02 AM, Markos Chandras
<Markos.Chandras@imgtec.com> wrote:
> Hi, please review the attached patch. It is a trivial fix for slightly old
> GCC versions.
It would be better to set it below the declarations. Although this
isn't part of check_patch.pl, it's a BSD style(9)'ism that makes
things a lot easier to read.
Thanks,
-Garrett
------------------------------------------------------------------------------
Write once. Port to many.
Get the SDK and tools to simplify cross-platform app development. Create
new or port existing apps to sell to consumers worldwide. Explore the
Intel AppUpSM program developer opportunity. appdeveloper.intel.com/join
http://p.sf.net/sfu/intel-appdev
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [LTP] [PATCH 07/21] cgroup/getdelays: Squish uninitialized variable warning for old GCC compilers
2012-01-03 19:30 ` Garrett Cooper
@ 2012-01-04 14:30 ` Cyril Hrubis
[not found] ` <4F046059.9000202@imgtec.com>
0 siblings, 1 reply; 4+ messages in thread
From: Cyril Hrubis @ 2012-01-04 14:30 UTC (permalink / raw)
To: Garrett Cooper; +Cc: ltp-list, Markos Chandras
Hi!
> It would be better to set it below the declarations. Although this
> isn't part of check_patch.pl, it's a BSD style(9)'ism that makes
> things a lot easier to read.
If this is only to silence compiler warning I would commit this as it
is.
--
Cyril Hrubis
chrubis@suse.cz
------------------------------------------------------------------------------
Ridiculously easy VDI. With Citrix VDI-in-a-Box, you don't need a complex
infrastructure or vast IT resources to deliver seamless, secure access to
virtual desktops. With this all-in-one solution, easily deploy virtual
desktops for less than the cost of PCs and save 60% on VDI infrastructure
costs. Try it free! http://p.sf.net/sfu/Citrix-VDIinabox
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [LTP] [PATCH 07/21] cgroup/getdelays: Squish uninitialized variable warning for old GCC compilers
[not found] ` <4F046059.9000202@imgtec.com>
@ 2012-01-04 15:55 ` Cyril Hrubis
0 siblings, 0 replies; 4+ messages in thread
From: Cyril Hrubis @ 2012-01-04 15:55 UTC (permalink / raw)
To: Markos Chandras; +Cc: ltp-list
Hi!
> >If this is only to silence compiler warning I would commit this as it
> >is.
> >
> I studied the code over and over and cmd_type is never used
> uninitialized. So yes, it is just a simple fix to silence old
> compilers.
Seems so to me as well, commited.
--
Cyril Hrubis
chrubis@suse.cz
------------------------------------------------------------------------------
Ridiculously easy VDI. With Citrix VDI-in-a-Box, you don't need a complex
infrastructure or vast IT resources to deliver seamless, secure access to
virtual desktops. With this all-in-one solution, easily deploy virtual
desktops for less than the cost of PCs and save 60% on VDI infrastructure
costs. Try it free! http://p.sf.net/sfu/Citrix-VDIinabox
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2012-01-04 15:44 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-03 11:02 [LTP] [PATCH 07/21] cgroup/getdelays: Squish uninitialized variable warning for old GCC compilers Markos Chandras
2012-01-03 19:30 ` Garrett Cooper
2012-01-04 14:30 ` Cyril Hrubis
[not found] ` <4F046059.9000202@imgtec.com>
2012-01-04 15:55 ` Cyril Hrubis
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox