* [LTP] [PATCH] Removed Warning from filecaps
@ 2010-03-23 9:39 Rishikesh K Rajak
2010-03-23 16:43 ` Garrett Cooper
0 siblings, 1 reply; 2+ messages in thread
From: Rishikesh K Rajak @ 2010-03-23 9:39 UTC (permalink / raw)
To: ltp-list
These warning will appear when HAVE_LIBCAP is not defined.
c.c: In function ‘main’:
c.c:28: warning: unused variable ‘ret’
c.c:27: warning: unused variable ‘caps2’
c.c:27: warning: unused variable ‘caps’
Signed-off By: Rishikesh K Rajak<risrajak@linux.vnet.ibm.com>
---
diff --git a/testcases/kernel/security/filecaps/c.c b/testcases/kernel/security/filecaps/c.c
index ee6cf05..5e1696c 100644
--- a/testcases/kernel/security/filecaps/c.c
+++ b/testcases/kernel/security/filecaps/c.c
@@ -24,10 +24,11 @@
int main()
{
+
+#ifdef HAVE_LIBCAP
cap_t caps, caps2;
int ret;
-#ifdef HAVE_LIBCAP
caps = cap_from_text("cap_setpcap+ep");
caps2 = cap_from_text("cap_setpcap+ep");
ret = cap_set_proc(caps);
--
Thanks & Regards
Rishi
LTP Maintainer
IBM, LTC, Bangalore
Please join IRC #ltp @ irc.freenode.net
------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [LTP] [PATCH] Removed Warning from filecaps
2010-03-23 9:39 [LTP] [PATCH] Removed Warning from filecaps Rishikesh K Rajak
@ 2010-03-23 16:43 ` Garrett Cooper
0 siblings, 0 replies; 2+ messages in thread
From: Garrett Cooper @ 2010-03-23 16:43 UTC (permalink / raw)
To: ltp-list
On Tue, Mar 23, 2010 at 2:39 AM, Rishikesh K Rajak
<risrajak@linux.vnet.ibm.com> wrote:
> These warning will appear when HAVE_LIBCAP is not defined.
>
> c.c: In function ‘main’:
> c.c:28: warning: unused variable ‘ret’
> c.c:27: warning: unused variable ‘caps2’
> c.c:27: warning: unused variable ‘caps’
>
> Signed-off By: Rishikesh K Rajak<risrajak@linux.vnet.ibm.com>
> ---
> diff --git a/testcases/kernel/security/filecaps/c.c b/testcases/kernel/security/filecaps/c.c
> index ee6cf05..5e1696c 100644
> --- a/testcases/kernel/security/filecaps/c.c
> +++ b/testcases/kernel/security/filecaps/c.c
> @@ -24,10 +24,11 @@
>
> int main()
> {
> +
> +#ifdef HAVE_LIBCAP
> cap_t caps, caps2;
> int ret;
>
> -#ifdef HAVE_LIBCAP
> caps = cap_from_text("cap_setpcap+ep");
> caps2 = cap_from_text("cap_setpcap+ep");
> ret = cap_set_proc(caps);
This is better because it also avoids compilation failures when libcap
isn't present. The conditional around sys/capability.h should be
restored as well.
Acked-by: Garrett Cooper <yanegomi@gmail.com>
Thanks,
-Garrett
------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-03-23 16:43 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-03-23 9:39 [LTP] [PATCH] Removed Warning from filecaps Rishikesh K Rajak
2010-03-23 16:43 ` Garrett Cooper
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.