|
From: Cyril H. <su...@li...> - 2013-03-27 17:21:26
|
The branch, master, has been updated
via e896b67af5888c30de9cd864503690b85e7060ab (commit)
via 9cb0dbcfd803e16f05d0e90d7e89fba15dc9d265 (commit)
via ca435d036172b087e44ccec63d6e19fcf870ace4 (commit)
via e5bbcd4d54738328b63df55e16ea3a9983ec4244 (commit)
from bd3edab243b5ee19f89d394ac90172cff82073e1 (commit)
- Log -----------------------------------------------------------------
commit e896b67af5888c30de9cd864503690b85e7060ab
Author: Cyril Hrubis <ch...@su...>
Date: Wed Mar 27 18:10:43 2013 +0100
open_posix_testsuite/.../sched_setscheduler: Fix.
* Change exit() to plain return
* Silence unused warnings
Signed-off-by: Cyril Hrubis <ch...@su...>
commit 9cb0dbcfd803e16f05d0e90d7e89fba15dc9d265
Author: Cyril Hrubis <ch...@su...>
Date: Wed Mar 27 18:05:30 2013 +0100
open_posix_testsuite/.../pthread_once: Fix.
* Remove the return from a function returning void
Signed-off-by: Cyril Hrubis <ch...@su...>
commit ca435d036172b087e44ccec63d6e19fcf870ace4
Author: Cyril Hrubis <ch...@su...>
Date: Wed Mar 27 17:44:01 2013 +0100
open_posix_testsuite/.../sigaltstack: Fix.
* Remove unused variable
* Silence unused warnings
* Remove useless casts
Signed-off-by: Cyril Hrubis <ch...@su...>
commit e5bbcd4d54738328b63df55e16ea3a9983ec4244
Author: Cyril Hrubis <ch...@su...>
Date: Wed Mar 27 17:33:11 2013 +0100
open_posix_testsuite/.../pthread_spin_trylock: Fix.
* Fix ordering 'volatile static' vs 'static volatile'
* Silence unused warning
Signed-off-by: Cyril Hrubis <ch...@su...>
-----------------------------------------------------------------------
Summary of changes:
.../conformance/interfaces/pthread_once/1-1.c | 1 -
.../interfaces/pthread_spin_trylock/1-1.c | 6 ++++--
.../interfaces/sched_setscheduler/15-1.c | 1 +
.../interfaces/sched_setscheduler/15-2.c | 1 +
.../interfaces/sched_setscheduler/17-5.c | 4 ++--
.../interfaces/sched_setscheduler/22-1.c | 1 +
.../interfaces/sched_setscheduler/22-2.c | 1 +
.../conformance/interfaces/sigaltstack/1-1.c | 4 ++--
.../conformance/interfaces/sigaltstack/10-1.c | 4 ++--
.../conformance/interfaces/sigaltstack/11-1.c | 4 ++--
.../conformance/interfaces/sigaltstack/12-1.c | 4 ++--
.../conformance/interfaces/sigaltstack/2-1.c | 6 +++---
.../conformance/interfaces/sigaltstack/3-1.c | 6 +++---
.../conformance/interfaces/sigaltstack/5-1.c | 4 ++--
.../conformance/interfaces/sigaltstack/6-1.c | 6 +++---
.../conformance/interfaces/sigaltstack/7-1.c | 8 ++++----
.../conformance/interfaces/sigaltstack/8-1.c | 8 ++++----
.../conformance/interfaces/sigaltstack/9-1.c | 1 -
18 files changed, 37 insertions(+), 33 deletions(-)
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_once/1-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_once/1-1.c
index 48d6e55..bb212c0 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_once/1-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_once/1-1.c
@@ -32,7 +32,6 @@ static int init_flag;
void an_init_func(void)
{
init_flag++;
- return NULL;
}
int main(void)
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/pthread_spin_trylock/1-1.c b/testcases/open_posix_testsuite/conformance/interfaces/pthread_spin_trylock/1-1.c
index 43399ad..0ba6994 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/pthread_spin_trylock/1-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/pthread_spin_trylock/1-1.c
@@ -30,8 +30,8 @@
#include "posixtest.h"
static pthread_spinlock_t spinlock;
-volatile static int thread_state;
-int rc;
+static volatile int thread_state;
+static int rc;
#define NOT_CREATED_THREAD 1
#define ENTERED_THREAD 2
@@ -56,6 +56,8 @@ static void *fn_chld(void *arg)
struct sigaction act;
thread_state = ENTERED_THREAD;
+ (void) arg;
+
/* Set up child thread to handle SIGALRM */
act.sa_flags = 0;
act.sa_handler = sig_handler;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sched_setscheduler/15-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sched_setscheduler/15-1.c
index 9afda3e..305a6da 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sched_setscheduler/15-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sched_setscheduler/15-1.c
@@ -21,6 +21,7 @@
void *runner(void *arg)
{
+ (void) arg;
while (1)
sleep(1);
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sched_setscheduler/15-2.c b/testcases/open_posix_testsuite/conformance/interfaces/sched_setscheduler/15-2.c
index 1fe16c8..30013bb 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sched_setscheduler/15-2.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sched_setscheduler/15-2.c
@@ -21,6 +21,7 @@
void *runner(void *arg)
{
+ (void) arg;
while (1)
sleep(1);
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sched_setscheduler/17-5.c b/testcases/open_posix_testsuite/conformance/interfaces/sched_setscheduler/17-5.c
index 88346c7..7082af2 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sched_setscheduler/17-5.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sched_setscheduler/17-5.c
@@ -75,13 +75,13 @@ int main(void)
if (old_policy != new_policy) {
printf("Failed: invalid policy change, old: %u, new %u\n",
old_policy, new_policy);
- exit(PTS_FAIL);
+ return PTS_FAIL;
}
if (old_priority != param.sched_priority) {
printf("Failed: invalid priority change, old: %u, new %u\n",
old_priority, param.sched_priority);
- exit(PTS_FAIL);
+ return PTS_FAIL;
}
printf("Test PASSED\n");
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sched_setscheduler/22-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sched_setscheduler/22-1.c
index 1e82b76..ad0a469 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sched_setscheduler/22-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sched_setscheduler/22-1.c
@@ -21,6 +21,7 @@
void *runner(void *arg)
{
+ (void) arg;
while (1)
sleep(1);
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sched_setscheduler/22-2.c b/testcases/open_posix_testsuite/conformance/interfaces/sched_setscheduler/22-2.c
index 546e6f2..2196ecc 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sched_setscheduler/22-2.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sched_setscheduler/22-2.c
@@ -21,6 +21,7 @@
void *runner(void *arg)
{
+ (void) arg;
while (1)
sleep(1);
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaltstack/1-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaltstack/1-1.c
index 9c46dd6..b3d2c34 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaltstack/1-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaltstack/1-1.c
@@ -30,7 +30,7 @@
stack_t alternate_s;
-void handler(int signo)
+void handler()
{
int i = 0;
if ((void *)&i < (alternate_s.ss_sp)
@@ -57,7 +57,7 @@ int main(void)
return PTS_UNRESOLVED;
}
- if ((alternate_s.ss_sp = (void *)malloc(SIGSTKSZ)) == NULL) {
+ if ((alternate_s.ss_sp = malloc(SIGSTKSZ)) == NULL) {
perror
("Unexpected error while attempting to setup test pre-conditions");
return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaltstack/10-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaltstack/10-1.c
index 7af6185..0452414 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaltstack/10-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaltstack/10-1.c
@@ -20,7 +20,7 @@
stack_t alternate_s;
-void handler(int signo)
+void handler()
{
printf("Just a dummy handler\n");
}
@@ -39,7 +39,7 @@ int main(void)
return PTS_UNRESOLVED;
}
- if ((alternate_s.ss_sp = (void *)malloc(SIGSTKSZ)) == NULL) {
+ if ((alternate_s.ss_sp = malloc(SIGSTKSZ)) == NULL) {
perror
("Unexpected error while attempting to setup test pre-conditions");
return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaltstack/11-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaltstack/11-1.c
index daabdb8..2c16411 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaltstack/11-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaltstack/11-1.c
@@ -29,7 +29,7 @@
stack_t altstack1;
-void handler(int signo)
+void handler()
{
printf("Just a dummy handler\n");
}
@@ -48,7 +48,7 @@ int main(void)
return PTS_UNRESOLVED;
}
- if ((altstack1.ss_sp = (void *)malloc(SIGSTKSZ)) == NULL) {
+ if ((altstack1.ss_sp = malloc(SIGSTKSZ)) == NULL) {
perror
("Unexpected error while attempting to setup test pre-conditions");
return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaltstack/12-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaltstack/12-1.c
index 3e42aaa..6fcefff 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaltstack/12-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaltstack/12-1.c
@@ -29,7 +29,7 @@
stack_t altstack1;
-void handler(int signo)
+void handler()
{
printf("Just a dummy handler\n");
}
@@ -48,7 +48,7 @@ int main(void)
return PTS_UNRESOLVED;
}
- if ((altstack1.ss_sp = (void *)malloc(SIGSTKSZ)) == NULL) {
+ if ((altstack1.ss_sp = malloc(SIGSTKSZ)) == NULL) {
perror
("Unexpected error while attempting to setup test pre-conditions");
return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaltstack/2-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaltstack/2-1.c
index 9fd49ee..a1cb9ec 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaltstack/2-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaltstack/2-1.c
@@ -29,9 +29,9 @@
#define SIGTOTEST SIGUSR1
-stack_t alternate_s, original_s;
+static stack_t alternate_s, original_s;
-void handler(int signo)
+void handler()
{
stack_t handler_s;
@@ -76,7 +76,7 @@ int main(void)
return PTS_UNRESOLVED;
}
- if ((alternate_s.ss_sp = (void *)malloc(SIGSTKSZ)) == NULL) {
+ if ((alternate_s.ss_sp = malloc(SIGSTKSZ)) == NULL) {
perror
("Unexpected error while attempting to setup test pre-conditions");
return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaltstack/3-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaltstack/3-1.c
index 5085336..3a3d7e3 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaltstack/3-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaltstack/3-1.c
@@ -31,9 +31,9 @@
#define SIGTOTEST SIGUSR1
-stack_t alternate_s;
+static stack_t alternate_s;
-void handler(int signo)
+void handler()
{
stack_t handler_s;
@@ -72,7 +72,7 @@ int main(void)
return PTS_UNRESOLVED;
}
- if ((alternate_s.ss_sp = (void *)malloc(SIGSTKSZ)) == NULL) {
+ if ((alternate_s.ss_sp = malloc(SIGSTKSZ)) == NULL) {
perror
("Unexpected error while attempting to setup test pre-conditions");
return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaltstack/5-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaltstack/5-1.c
index 3294166..f75a030 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaltstack/5-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaltstack/5-1.c
@@ -19,7 +19,7 @@
#define SIGTOTEST SIGUSR1
-void handler(int signo)
+void handler()
{
printf("Do nothing useful\n");
}
@@ -39,7 +39,7 @@ int main(void)
return PTS_UNRESOLVED;
}
- if ((alternate_s.ss_sp = (void *)malloc(SIGSTKSZ)) == NULL) {
+ if ((alternate_s.ss_sp = malloc(SIGSTKSZ)) == NULL) {
perror
("Unexpected error while attempting to setup test pre-conditions");
return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaltstack/6-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaltstack/6-1.c
index 046f287..0b6e6f2 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaltstack/6-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaltstack/6-1.c
@@ -27,9 +27,9 @@
#define SIGTOTEST SIGUSR1
-stack_t alternate_s;
+static stack_t alternate_s;
-void handler(int signo)
+void handler()
{
stack_t handler_s;
@@ -60,7 +60,7 @@ int main(void)
return PTS_UNRESOLVED;
}
- if ((alternate_s.ss_sp = (void *)malloc(SIGSTKSZ)) == NULL) {
+ if ((alternate_s.ss_sp = malloc(SIGSTKSZ)) == NULL) {
perror
("Unexpected error while attempting to setup test pre-conditions");
return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaltstack/7-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaltstack/7-1.c
index 429e58e..9319cd8 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaltstack/7-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaltstack/7-1.c
@@ -27,13 +27,13 @@
#define SIGTOTEST SIGUSR1
-stack_t altstack1;
+static stack_t altstack1;
-void handler(int signo)
+void handler()
{
stack_t altstack2;
- if ((altstack2.ss_sp = (void *)malloc(SIGSTKSZ)) == NULL) {
+ if ((altstack2.ss_sp = malloc(SIGSTKSZ)) == NULL) {
perror
("Unexpected error while attempting to setup test pre-conditions");
exit(PTS_UNRESOLVED);
@@ -63,7 +63,7 @@ int main(void)
return PTS_UNRESOLVED;
}
- if ((altstack1.ss_sp = (void *)malloc(SIGSTKSZ)) == NULL) {
+ if ((altstack1.ss_sp = malloc(SIGSTKSZ)) == NULL) {
perror
("Unexpected error while attempting to setup test pre-conditions");
return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaltstack/8-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaltstack/8-1.c
index 6c36f95..38a6965 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaltstack/8-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaltstack/8-1.c
@@ -27,13 +27,13 @@
#define SIGTOTEST SIGUSR1
-stack_t alternate_s;
+static stack_t alternate_s;
-void handler(int signo)
+void handler()
{
stack_t handler_s;
- if (sigaltstack((stack_t *) 0, &handler_s) == -1) {
+ if (sigaltstack(NULL, &handler_s) == -1) {
perror
("Unexpected error while attempting to setup test pre-conditions");
exit(PTS_UNRESOLVED);
@@ -60,7 +60,7 @@ int main(void)
return PTS_UNRESOLVED;
}
- if ((alternate_s.ss_sp = (void *)malloc(SIGSTKSZ)) == NULL) {
+ if ((alternate_s.ss_sp = malloc(SIGSTKSZ)) == NULL) {
perror
("Unexpected error while attempting to setup test pre-conditions");
return PTS_UNRESOLVED;
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/sigaltstack/9-1.c b/testcases/open_posix_testsuite/conformance/interfaces/sigaltstack/9-1.c
index 3f6d11f..ea9b7ef 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/sigaltstack/9-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/sigaltstack/9-1.c
@@ -35,7 +35,6 @@
#include "posixtest.h"
static stack_t a;
-static char path[PATH_MAX + 1];
int main(int argc, char *argv[])
{
hooks/post-receive
--
ltp
|