From: ERAMOTO Masaya <eramoto.masaya@jp.fujitsu.com>
To: ltp-list <ltp-list@lists.sourceforge.net>
Subject: [LTP] Fix warning at cpuset_syscall_test.c
Date: Fri, 17 Sep 2010 13:17:02 +0900 [thread overview]
Message-ID: <4C92EBBE.8090108@jp.fujitsu.com> (raw)
[-- 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
next reply other threads:[~2010-09-17 4:17 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-17 4:17 ERAMOTO Masaya [this message]
2010-09-17 4:47 ` [LTP] Fix warning at cpuset_syscall_test.c Garrett Cooper
2010-09-17 6:26 ` ERAMOTO Masaya
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4C92EBBE.8090108@jp.fujitsu.com \
--to=eramoto.masaya@jp.fujitsu.com \
--cc=ltp-list@lists.sourceforge.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox