summaryrefslogtreecommitdiff
path: root/libstdc++-v3/testsuite/thread
diff options
context:
space:
mode:
authorbkoz <bkoz@138bc75d-0d04-0410-961f-82ee72b054a4>2003-09-23 20:03:30 +0000
committerbkoz <bkoz@138bc75d-0d04-0410-961f-82ee72b054a4>2003-09-23 20:03:30 +0000
commitf8ef786cfd35341f4c3d1742375e22f829a0876f (patch)
tree743380001d2341c199e3740ca7296f1783cef17c /libstdc++-v3/testsuite/thread
parent33020648811e6f8f2313712ecb0e7ba99e2653b7 (diff)
downloadgcc-f8ef786cfd35341f4c3d1742375e22f829a0876f.tar.gz
2003-09-23 Benjamin Kosnik <bkoz@redhat.com>
* include/bits/locale_facets.tcc: Tweak to avoid warnings. * testsuite/testsuite_hooks.h: Same. * testsuite/*/*.cc: Same. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@71693 138bc75d-0d04-0410-961f-82ee72b054a4
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__)