summaryrefslogtreecommitdiffstats
path: root/libstdc++-v3/testsuite/thread
diff options
context:
space:
mode:
Diffstat (limited to 'libstdc++-v3/testsuite/thread')
-rw-r--r--libstdc++-v3/testsuite/thread/pthread1.cc2
-rw-r--r--libstdc++-v3/testsuite/thread/pthread5.cc4
-rw-r--r--libstdc++-v3/testsuite/thread/pthread6.cc4
-rw-r--r--libstdc++-v3/testsuite/thread/pthread7-rope.cc7
4 files changed, 10 insertions, 7 deletions
diff --git a/libstdc++-v3/testsuite/thread/pthread1.cc b/libstdc++-v3/testsuite/thread/pthread1.cc
index 1283a75119a..92a5f312842 100644
--- a/libstdc++-v3/testsuite/thread/pthread1.cc
+++ b/libstdc++-v3/testsuite/thread/pthread1.cc
@@ -100,7 +100,7 @@ consume (void* t)
}
int
-main (int argc, char** argv)
+main ()
{
pthread_t prod[thread_pairs];
pthread_t cons[thread_pairs];
diff --git a/libstdc++-v3/testsuite/thread/pthread5.cc b/libstdc++-v3/testsuite/thread/pthread5.cc
index cc556046d4d..262796e0ba7 100644
--- a/libstdc++-v3/testsuite/thread/pthread5.cc
+++ b/libstdc++-v3/testsuite/thread/pthread5.cc
@@ -50,7 +50,7 @@ struct tt_t
void*
thread_function (void* arg)
{
- int myid = *(int*) arg;
+ int myid __attribute__((unused)) = *(int*) arg;
for (int i = 0; i < LOOPS; i++)
{
vector<tt_t> myvect1;
@@ -88,7 +88,7 @@ thread_function (void* arg)
}
int
-main (int argc, char *argv[])
+main ()
{
int worker;
pthread_t threads[NTHREADS];
diff --git a/libstdc++-v3/testsuite/thread/pthread6.cc b/libstdc++-v3/testsuite/thread/pthread6.cc
index d88f77e77e1..c72acb53985 100644
--- a/libstdc++-v3/testsuite/thread/pthread6.cc
+++ b/libstdc++-v3/testsuite/thread/pthread6.cc
@@ -37,8 +37,8 @@ const int loops = 100000;
const char* my_default = "Hallo Welt!";
-const int upper_limit = 2500;
-const int lower_limit = 1000;
+const std::size_t upper_limit = 2500;
+const std::size_t lower_limit = 1000;
typedef char charT;
diff --git a/libstdc++-v3/testsuite/thread/pthread7-rope.cc b/libstdc++-v3/testsuite/thread/pthread7-rope.cc
index 716ba00ccab..36acd461e87 100644
--- a/libstdc++-v3/testsuite/thread/pthread7-rope.cc
+++ b/libstdc++-v3/testsuite/thread/pthread7-rope.cc
@@ -36,7 +36,7 @@ const int max_loop_count = 10000;
__gnu_cxx::crope foo4;
-void* thread_main (void *)
+void* thread_main(void *)
{
// To see a problem with gcc 3.3 and before, set a break point here.
// Single step through c_str implementation, call sched_yield after
@@ -48,13 +48,16 @@ void* thread_main (void *)
// Please note that the memory leak in the rope implementation with
// this test case, existed before and after fixing this bug...
-
+ bool test __attribute__((unused)) = true;
VERIFY( !std::strcmp (data4, "barbazbonglehellohellohello") );
+ return 0;
}
int
main()
{
+ bool test __attribute__((unused)) = true;
+
pthread_t tid[max_thread_count];
#if defined(__sun) && defined(__svr4__)
OpenPOWER on IntegriCloud