From: Paul Moore <pmoore@redhat.com>
To: selinux@tycho.nsa.gov
Subject: [PATCH 5/6] selinux-testsuite: fix compile problems in tests/shm
Date: Thu, 04 Jun 2015 15:42:13 -0400 [thread overview]
Message-ID: <20150604194213.31270.80754.stgit@localhost> (raw)
In-Reply-To: <20150604194045.31270.58300.stgit@localhost>
Resolve the following problems:
make[2]: Entering directory '/home/pmoore/sources/selinux-testsuite/selinux_testsuite-upstream/tests/shm'
cc -g -O0 -Wall -D_GNU_SOURCE shmctl.c -o shmctl
shmctl.c: In function 'main':
shmctl.c:11:6: warning: variable 'num' set but not used
int num = 1;
^
cc -g -O0 -Wall -D_GNU_SOURCE shmat.c -o shmat
shmat.c: In function 'main':
shmat.c:11:6: warning: variable 'num' set but not used
int num = 1;
^
cc -g -O0 -Wall -D_GNU_SOURCE shmget.c -o shmget
shmget.c: In function 'main':
shmget.c:11:6: warning: variable 'num' set but not used
int num = 1;
^
Signed-off-by: Paul Moore <paul@paul-moore.com>
---
tests/shm/shmat.c | 6 +-----
tests/shm/shmctl.c | 6 +-----
tests/shm/shmget.c | 6 +-----
3 files changed, 3 insertions(+), 15 deletions(-)
diff --git a/tests/shm/shmat.c b/tests/shm/shmat.c
index 89ac299..704d676 100644
--- a/tests/shm/shmat.c
+++ b/tests/shm/shmat.c
@@ -8,20 +8,16 @@
int main(int argc, char **argv)
{
int ch;
- int num = 1;
int key = 0x8888;
int id;
int error;
char *buf;
- while ((ch = getopt(argc, argv, "k:-n:")) != -1) {
+ while ((ch = getopt(argc, argv, "k:")) != -1) {
switch (ch) {
case 'k':
key = atoi(optarg);
break;
- case 'n':
- num = atoi(optarg);
- break;
}
}
diff --git a/tests/shm/shmctl.c b/tests/shm/shmctl.c
index 78397b6..d17a804 100644
--- a/tests/shm/shmctl.c
+++ b/tests/shm/shmctl.c
@@ -8,20 +8,16 @@
int main(int argc, char **argv)
{
int ch;
- int num = 1;
int key = 0x8888;
int id;
int error;
struct shmid_ds buf;
- while ((ch = getopt(argc, argv, "k:-n:")) != -1) {
+ while ((ch = getopt(argc, argv, "k:")) != -1) {
switch (ch) {
case 'k':
key = atoi(optarg);
break;
- case 'n':
- num = atoi(optarg);
- break;
}
}
diff --git a/tests/shm/shmget.c b/tests/shm/shmget.c
index a04da25..42d6394 100644
--- a/tests/shm/shmget.c
+++ b/tests/shm/shmget.c
@@ -8,18 +8,14 @@
int main(int argc, char **argv)
{
int ch;
- int num = 1;
int key = 0x8888;
int id;
- while ((ch = getopt(argc, argv, "k:-n:")) != -1) {
+ while ((ch = getopt(argc, argv, "k:")) != -1) {
switch (ch) {
case 'k':
key = atoi(optarg);
break;
- case 'n':
- num = atoi(optarg);
- break;
}
}
next prev parent reply other threads:[~2015-06-04 19:42 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-04 19:41 [PATCH v2 0/6] SELinux testsuite compilation fixes Paul Moore
2015-06-04 19:41 ` [PATCH 1/6] selinux-testsuite: add _GNU_SOURCE to tests/Makefile Paul Moore
2015-06-04 19:50 ` Stephen Smalley
2015-06-04 20:50 ` Paul Moore
2015-06-04 19:41 ` [PATCH 2/6] selinux-testsuite: add some default CFLAGS Paul Moore
2015-06-04 19:42 ` [PATCH 3/6] selinux-testsuite: fix some compile warnings in tests/nnp Paul Moore
2015-06-04 19:42 ` [PATCH 4/6] selinux-testsuite: fix compile warnings in tests/setnice Paul Moore
2015-06-04 19:42 ` Paul Moore [this message]
2015-06-04 19:42 ` [PATCH 6/6] selinux-testsuite: fix compile problems in tests/capable_file Paul Moore
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=20150604194213.31270.80754.stgit@localhost \
--to=pmoore@redhat.com \
--cc=selinux@tycho.nsa.gov \
/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 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.