public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
* [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&#174; 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

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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox