public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
* [LTP] Fix warning at cpuset_syscall_test.c
@ 2010-09-17  4:17 ERAMOTO Masaya
  2010-09-17  4:47 ` Garrett Cooper
  0 siblings, 1 reply; 3+ messages in thread
From: ERAMOTO Masaya @ 2010-09-17  4:17 UTC (permalink / raw)
  To: ltp-list

[-- Attachment #1: Type: text/plain, Size: 1611 bytes --]

Hi,

I found the following warning at cpuset_syscall_test.c.

===============
make[5]: Entering directory `/root/ltp/ltp-old/testcases/kernel/controllers/cpuset/cpuset_syscall_test'
gcc -g -O2 -g -O2 -fno-strict-aliasing -pipe -Wall  -I/root/ltp/ltp-old/testcases/kernel/include -I../../../../../include -I../../../../../include
-L/root/ltp/ltp-old/testcases/kernel/controllers/cpuset/cpuset_syscall_test/../cpuset_lib
-L/root/ltp/ltp-old/testcases/kernel/controllers/cpuset/cpuset_syscall_test/../../libcontrollers -L../../../../../lib  cpuset_syscall_test.c   -lltp -lcpu_set
-lcontrollers -lltp -o cpuset_syscall_test
cpuset_syscall_test.c: In function 'main':
cpuset_syscall_test.c:254: warning: control reaches end of non-void function
make[5]: Leaving directory `/root/ltp/ltp-old/testcases/kernel/controllers/cpuset/cpuset_syscall_test'
===============

This warning appears because it doesn't have "return <num>" in main().
The attached patch will fix it.

Signed-off-by: ERAMOTO Masaya <eramoto.masaya@jp.fujitsu.com>
===============
diff --git a/testcases/kernel/controllers/cpuset/cpuset_syscall_test/cpuset_syscall_test.c
b/testcases/kernel/controllers/cpuset/cpuset_syscall_test/cpuset_syscall_test.c
index 961d0f9..0d4fe87 100644
--- a/testcases/kernel/controllers/cpuset/cpuset_syscall_test/cpuset_syscall_test.c
+++ b/testcases/kernel/controllers/cpuset/cpuset_syscall_test/cpuset_syscall_test.c
@@ -251,5 +251,6 @@ int main(int argc, char *argv[])
 #else
 int main (void) {
 	printf("System doesn't have required mempolicy support\n");
+	return -1;
 }
 #endif
===============

Thanks,
ERAMOTO


[-- Attachment #2: fix_warning_at_cpuset_syscall_test.c.patch --]
[-- Type: text/plain, Size: 534 bytes --]

diff --git a/testcases/kernel/controllers/cpuset/cpuset_syscall_test/cpuset_syscall_test.c b/testcases/kernel/controllers/cpuset/cpuset_syscall_test/cpuset_syscall_test.c
index 961d0f9..0d4fe87 100644
--- a/testcases/kernel/controllers/cpuset/cpuset_syscall_test/cpuset_syscall_test.c
+++ b/testcases/kernel/controllers/cpuset/cpuset_syscall_test/cpuset_syscall_test.c
@@ -251,5 +251,6 @@ int main(int argc, char *argv[])
 #else
 int main (void) {
 	printf("System doesn't have required mempolicy support\n");
+	return -1;
 }
 #endif

[-- Attachment #3: Type: text/plain, Size: 276 bytes --]

------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev

[-- 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] 3+ messages in thread

end of thread, other threads:[~2010-09-17  6:27 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-09-17  4:17 [LTP] Fix warning at cpuset_syscall_test.c ERAMOTO Masaya
2010-09-17  4:47 ` Garrett Cooper
2010-09-17  6:26   ` ERAMOTO Masaya

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox