aboutsummaryrefslogtreecommitdiff
path: root/string
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2003-04-17 17:38:38 +0000
committerUlrich Drepper <drepper@redhat.com>2003-04-17 17:38:38 +0000
commitc9df3df9d2a1d7a87f8026b6279639bca0962b91 (patch)
treeaa11dfb022d7115fcb1d744a2c2cd968de7da359 /string
parent9e9f1f159bb957faa125f50efb953088aec831ef (diff)
downloadglibc-c9df3df9d2a1d7a87f8026b6279639bca0962b91.tar
glibc-c9df3df9d2a1d7a87f8026b6279639bca0962b91.tar.gz
glibc-c9df3df9d2a1d7a87f8026b6279639bca0962b91.tar.bz2
glibc-c9df3df9d2a1d7a87f8026b6279639bca0962b91.zip
Update.
* string/test-memchr.c: Likewise. * string/test-memcmp.c: Likewise. * string/test-memcpy.c: Likewise. * string/test-memmove.c: Likewise. * string/test-memset.c: Likewise. * string/test-strcat.c: Likewise. * string/test-strchr.c: Likewise. * string/test-strcmp.c: Likewise. * string/test-strcpy.c: Likewise. * string/test-strlen.c: Likewise. * string/test-strncmp.c: Likewise. * string/test-strpbrk.c: Likewise. * string/test-strrchr.c: Likewise. * string/test-strspn.c: Likewise.
Diffstat (limited to 'string')
-rw-r--r--string/test-memchr.c8
-rw-r--r--string/test-memcmp.c4
-rw-r--r--string/test-memcpy.c8
-rw-r--r--string/test-memmove.c6
-rw-r--r--string/test-memset.c6
-rw-r--r--string/test-strcat.c6
-rw-r--r--string/test-strchr.c10
-rw-r--r--string/test-strcmp.c4
-rw-r--r--string/test-strcpy.c6
-rw-r--r--string/test-strlen.c8
-rw-r--r--string/test-strncmp.c4
-rw-r--r--string/test-strpbrk.c6
-rw-r--r--string/test-strrchr.c8
-rw-r--r--string/test-strspn.c6
14 files changed, 59 insertions, 31 deletions
diff --git a/string/test-memchr.c b/string/test-memchr.c
index e5c13a2c2d..df866fe2d7 100644
--- a/string/test-memchr.c
+++ b/string/test-memchr.c
@@ -1,5 +1,5 @@
/* Test and measure memchr functions.
- Copyright (C) 1999, 2002 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2002, 2003 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Written by Jakub Jelinek <jakub@redhat.com>, 1999.
@@ -50,7 +50,9 @@ do_one_test (impl_t *impl, const char *s, int c, size_t n, char *exp_res)
if (HP_TIMING_AVAIL)
{
- hp_timing_t start, stop, best_time = ~ (hp_timing_t) 0;
+ hp_timing_t start __attribute ((unused));
+ hp_timing_t stop __attribute ((unused));
+ hp_timing_t best_time = ~ (hp_timing_t) 0;
size_t i;
for (i = 0; i < 32; ++i)
@@ -74,7 +76,7 @@ do_test (size_t align, size_t pos, size_t len, int seek_char)
align &= 7;
if (align + len >= page_size)
return;
-
+
for (i = 0; i < len; ++i)
{
buf1[align + i] = 1 + 23 * i % 127;
diff --git a/string/test-memcmp.c b/string/test-memcmp.c
index 4d38ddbf6a..89c104386b 100644
--- a/string/test-memcmp.c
+++ b/string/test-memcmp.c
@@ -54,7 +54,9 @@ do_one_test (impl_t *impl, const char *s1, const char *s2, size_t len,
if (HP_TIMING_AVAIL)
{
- hp_timing_t start, stop, best_time = ~ (hp_timing_t) 0;
+ hp_timing_t start __attribute ((unused));
+ hp_timing_t stop __attribute ((unused));
+ hp_timing_t best_time = ~ (hp_timing_t) 0;
size_t i;
for (i = 0; i < 32; ++i)
diff --git a/string/test-memcpy.c b/string/test-memcpy.c
index 5549ead1cd..adc90da767 100644
--- a/string/test-memcpy.c
+++ b/string/test-memcpy.c
@@ -1,5 +1,5 @@
/* Test and measure memcpy functions.
- Copyright (C) 1999, 2002 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2002, 2003 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Written by Jakub Jelinek <jakub@redhat.com>, 1999.
@@ -71,7 +71,9 @@ do_one_test (impl_t *impl, char *dst, const char *src,
if (HP_TIMING_AVAIL)
{
- hp_timing_t start, stop, best_time = ~ (hp_timing_t) 0;
+ hp_timing_t start __attribute ((unused));
+ hp_timing_t stop __attribute ((unused));
+ hp_timing_t best_time = ~ (hp_timing_t) 0;
size_t i;
for (i = 0; i < 32; ++i)
@@ -172,7 +174,7 @@ do_random_tests (void)
if (align2 + len > size2)
align2 = size2 - len;
}
- }
+ }
p1 = buf1 + page_size - size1;
p2 = buf2 + page_size - size2;
c = random () & 255;
diff --git a/string/test-memmove.c b/string/test-memmove.c
index deb06e1e19..9531aa82d8 100644
--- a/string/test-memmove.c
+++ b/string/test-memmove.c
@@ -1,5 +1,5 @@
/* Test and measure memmove functions.
- Copyright (C) 1999, 2002 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2002, 2003 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Written by Jakub Jelinek <jakub@redhat.com>, 1999.
@@ -70,7 +70,9 @@ do_one_test (impl_t *impl, char *dst, char *src, const char *orig_src,
if (HP_TIMING_AVAIL)
{
- hp_timing_t start, stop, best_time = ~ (hp_timing_t) 0;
+ hp_timing_t start __attribute ((unused));
+ hp_timing_t stop __attribute ((unused));
+ hp_timing_t best_time = ~ (hp_timing_t) 0;
size_t i;
for (i = 0; i < 32; ++i)
diff --git a/string/test-memset.c b/string/test-memset.c
index 2847502f10..9ae774162f 100644
--- a/string/test-memset.c
+++ b/string/test-memset.c
@@ -1,5 +1,5 @@
/* Test and measure memset functions.
- Copyright (C) 1999, 2002 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2002, 2003 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Written by Jakub Jelinek <jakub@redhat.com>, 1999.
@@ -59,7 +59,9 @@ do_one_test (impl_t *impl, char *s, int c, size_t n)
if (HP_TIMING_AVAIL)
{
- hp_timing_t start, stop, best_time = ~ (hp_timing_t) 0;
+ hp_timing_t start __attribute ((unused));
+ hp_timing_t stop __attribute ((unused));
+ hp_timing_t best_time = ~ (hp_timing_t) 0;
size_t i;
for (i = 0; i < 32; ++i)
diff --git a/string/test-strcat.c b/string/test-strcat.c
index d241741c5e..a3adfe3d8d 100644
--- a/string/test-strcat.c
+++ b/string/test-strcat.c
@@ -1,5 +1,5 @@
/* Test and measure strcat functions.
- Copyright (C) 1999, 2002 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2002, 2003 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Written by Jakub Jelinek <jakub@redhat.com>, 1999.
@@ -59,7 +59,9 @@ do_one_test (impl_t *impl, char *dst, const char *src)
if (HP_TIMING_AVAIL)
{
- hp_timing_t start, stop, best_time = ~ (hp_timing_t) 0;
+ hp_timing_t start __attribute ((used));
+ hp_timing_t stop __attribute ((used));
+ hp_timing_t best_time = ~ (hp_timing_t) 0;
size_t i;
for (i = 0; i < 32; ++i)
diff --git a/string/test-strchr.c b/string/test-strchr.c
index 9483e719c0..1333ebc8bc 100644
--- a/string/test-strchr.c
+++ b/string/test-strchr.c
@@ -1,5 +1,5 @@
/* Test and measure strchr functions.
- Copyright (C) 1999, 2002 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2002, 2003 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Written by Jakub Jelinek <jakub@redhat.com>, 1999.
@@ -34,7 +34,7 @@ simple_strchr (const char *s, int c)
{
for (; *s != (char) c; ++s)
if (*s == '\0')
- return NULL;
+ return NULL;
return (char *) s;
}
@@ -63,7 +63,9 @@ do_one_test (impl_t *impl, const char *s, int c, char *exp_res)
if (HP_TIMING_AVAIL)
{
- hp_timing_t start, stop, best_time = ~ (hp_timing_t) 0;
+ hp_timing_t start __attribute ((unused));
+ hp_timing_t stop __attribute ((unused));
+ hp_timing_t best_time = ~ (hp_timing_t) 0;
size_t i;
for (i = 0; i < 32; ++i)
@@ -87,7 +89,7 @@ do_test (size_t align, size_t pos, size_t len, int seek_char, int max_char)
align &= 7;
if (align + len >= page_size)
return;
-
+
for (i = 0; i < len; ++i)
{
buf1[align + i] = 32 + 23 * i % (max_char - 32);
diff --git a/string/test-strcmp.c b/string/test-strcmp.c
index 63f14f1ce4..af49f14fe1 100644
--- a/string/test-strcmp.c
+++ b/string/test-strcmp.c
@@ -68,7 +68,9 @@ do_one_test (impl_t *impl, const char *s1, const char *s2, int exp_result)
if (HP_TIMING_AVAIL)
{
- hp_timing_t start, stop, best_time = ~ (hp_timing_t) 0;
+ hp_timing_t start __attribute ((unused));
+ hp_timing_t stop __attribute ((unused));
+ hp_timing_t best_time = ~ (hp_timing_t) 0;
size_t i;
for (i = 0; i < 32; ++i)
diff --git a/string/test-strcpy.c b/string/test-strcpy.c
index c198a9d59e..dbfbb9294d 100644
--- a/string/test-strcpy.c
+++ b/string/test-strcpy.c
@@ -1,5 +1,5 @@
/* Test and measure strcpy functions.
- Copyright (C) 1999, 2002 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2002, 2003 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Written by Jakub Jelinek <jakub@redhat.com>, 1999.
@@ -61,7 +61,9 @@ do_one_test (impl_t *impl, char *dst, const char *src,
if (HP_TIMING_AVAIL)
{
- hp_timing_t start, stop, best_time = ~ (hp_timing_t) 0;
+ hp_timing_t start __attribute ((unused));
+ hp_timing_t stop __attribute ((unused));;
+ hp_timing_t best_time = ~ (hp_timing_t) 0;
size_t i;
for (i = 0; i < 32; ++i)
diff --git a/string/test-strlen.c b/string/test-strlen.c
index 22b7c1ad53..82ad95e5cc 100644
--- a/string/test-strlen.c
+++ b/string/test-strlen.c
@@ -1,5 +1,5 @@
/* Test and measure strlen functions.
- Copyright (C) 1999, 2002 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2002, 2003 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Written by Jakub Jelinek <jakub@redhat.com>, 1999.
@@ -58,7 +58,9 @@ do_one_test (impl_t *impl, const char *s, size_t exp_len)
if (HP_TIMING_AVAIL)
{
- hp_timing_t start, stop, best_time = ~ (hp_timing_t) 0;
+ hp_timing_t start __attribute ((unused));
+ hp_timing_t stop __attribute ((unused));
+ hp_timing_t best_time = ~ (hp_timing_t) 0;
size_t i;
for (i = 0; i < 32; ++i)
@@ -81,7 +83,7 @@ do_test (size_t align, size_t len, int max_char)
align &= 7;
if (align + len >= page_size)
return;
-
+
for (i = 0; i < len; ++i)
buf1[align + i] = 1 + 7 * i % max_char;
buf1[align + len] = 0;
diff --git a/string/test-strncmp.c b/string/test-strncmp.c
index 4fed4e50f1..431b64d6af 100644
--- a/string/test-strncmp.c
+++ b/string/test-strncmp.c
@@ -68,7 +68,9 @@ do_one_test (impl_t *impl, const char *s1, const char *s2, size_t n,
if (HP_TIMING_AVAIL)
{
- hp_timing_t start, stop, best_time = ~ (hp_timing_t) 0;
+ hp_timing_t start __attribute ((unused));
+ hp_timing_t stop __attribute ((unused));
+ hp_timing_t best_time = ~ (hp_timing_t) 0;
size_t i;
for (i = 0; i < 32; ++i)
diff --git a/string/test-strpbrk.c b/string/test-strpbrk.c
index a920c00041..2ec52fd286 100644
--- a/string/test-strpbrk.c
+++ b/string/test-strpbrk.c
@@ -1,5 +1,5 @@
/* Test and measure strpbrk functions.
- Copyright (C) 1999, 2002 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2002, 2003 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Written by Jakub Jelinek <jakub@redhat.com>, 1999.
@@ -73,7 +73,9 @@ do_one_test (impl_t *impl, const char *s, const char *rej, RES_TYPE exp_res)
if (HP_TIMING_AVAIL)
{
- hp_timing_t start, stop, best_time = ~ (hp_timing_t) 0;
+ hp_timing_t start __attribute ((unused));
+ hp_timing_t stop __attribute ((unused));
+ hp_timing_t best_time = ~ (hp_timing_t) 0;
size_t i;
for (i = 0; i < 32; ++i)
diff --git a/string/test-strrchr.c b/string/test-strrchr.c
index 0f8da60a65..5aff75aeba 100644
--- a/string/test-strrchr.c
+++ b/string/test-strrchr.c
@@ -1,5 +1,5 @@
/* Test and measure strrchr functions.
- Copyright (C) 1999, 2002 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2002, 2003 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Written by Jakub Jelinek <jakub@redhat.com>, 1999.
@@ -53,7 +53,9 @@ do_one_test (impl_t *impl, const char *s, int c, char *exp_res)
if (HP_TIMING_AVAIL)
{
- hp_timing_t start, stop, best_time = ~ (hp_timing_t) 0;
+ hp_timing_t start __attribute ((unused));
+ hp_timing_t stop __attribute ((unused));
+ hp_timing_t best_time = ~ (hp_timing_t) 0;
size_t i;
for (i = 0; i < 32; ++i)
@@ -77,7 +79,7 @@ do_test (size_t align, size_t pos, size_t len, int seek_char, int max_char)
align &= 7;
if (align + len >= page_size)
return;
-
+
for (i = 0; i < len; ++i)
{
buf1[align + i] = random () & max_char;
diff --git a/string/test-strspn.c b/string/test-strspn.c
index 8701687d4b..de7351fe8c 100644
--- a/string/test-strspn.c
+++ b/string/test-strspn.c
@@ -1,5 +1,5 @@
/* Test and measure strspn functions.
- Copyright (C) 1999, 2002 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2002, 2003 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Written by Jakub Jelinek <jakub@redhat.com>, 1999.
@@ -77,7 +77,9 @@ do_one_test (impl_t *impl, const char *s, const char *acc, size_t exp_res)
if (HP_TIMING_AVAIL)
{
- hp_timing_t start, stop, best_time = ~ (hp_timing_t) 0;
+ hp_timing_t start __attribute ((unused));
+ hp_timing_t stop __attribute ((unused));
+ hp_timing_t best_time = ~ (hp_timing_t) 0;
size_t i;
for (i = 0; i < 32; ++i)