mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-21 20:40:05 +00:00
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.
This commit is contained in:
parent
9e9f1f159b
commit
c9df3df9d2
14
ChangeLog
14
ChangeLog
@ -31,6 +31,20 @@
|
|||||||
|
|
||||||
* string/test-strncpy.c (do_one_test): Mark start and stop as
|
* string/test-strncpy.c (do_one_test): Mark start and stop as
|
||||||
possibly unused.
|
possibly unused.
|
||||||
|
* 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.
|
||||||
|
|
||||||
2003-04-15 Roland McGrath <roland@redhat.com>
|
2003-04-15 Roland McGrath <roland@redhat.com>
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/* Test and measure memchr functions.
|
/* 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.
|
This file is part of the GNU C Library.
|
||||||
Written by Jakub Jelinek <jakub@redhat.com>, 1999.
|
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)
|
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;
|
size_t i;
|
||||||
|
|
||||||
for (i = 0; i < 32; ++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;
|
align &= 7;
|
||||||
if (align + len >= page_size)
|
if (align + len >= page_size)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
for (i = 0; i < len; ++i)
|
for (i = 0; i < len; ++i)
|
||||||
{
|
{
|
||||||
buf1[align + i] = 1 + 23 * i % 127;
|
buf1[align + i] = 1 + 23 * i % 127;
|
||||||
|
@ -54,7 +54,9 @@ do_one_test (impl_t *impl, const char *s1, const char *s2, size_t len,
|
|||||||
|
|
||||||
if (HP_TIMING_AVAIL)
|
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;
|
size_t i;
|
||||||
|
|
||||||
for (i = 0; i < 32; ++i)
|
for (i = 0; i < 32; ++i)
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/* Test and measure memcpy functions.
|
/* 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.
|
This file is part of the GNU C Library.
|
||||||
Written by Jakub Jelinek <jakub@redhat.com>, 1999.
|
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)
|
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;
|
size_t i;
|
||||||
|
|
||||||
for (i = 0; i < 32; ++i)
|
for (i = 0; i < 32; ++i)
|
||||||
@ -172,7 +174,7 @@ do_random_tests (void)
|
|||||||
if (align2 + len > size2)
|
if (align2 + len > size2)
|
||||||
align2 = size2 - len;
|
align2 = size2 - len;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
p1 = buf1 + page_size - size1;
|
p1 = buf1 + page_size - size1;
|
||||||
p2 = buf2 + page_size - size2;
|
p2 = buf2 + page_size - size2;
|
||||||
c = random () & 255;
|
c = random () & 255;
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/* Test and measure memmove functions.
|
/* 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.
|
This file is part of the GNU C Library.
|
||||||
Written by Jakub Jelinek <jakub@redhat.com>, 1999.
|
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)
|
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;
|
size_t i;
|
||||||
|
|
||||||
for (i = 0; i < 32; ++i)
|
for (i = 0; i < 32; ++i)
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/* Test and measure memset functions.
|
/* 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.
|
This file is part of the GNU C Library.
|
||||||
Written by Jakub Jelinek <jakub@redhat.com>, 1999.
|
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)
|
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;
|
size_t i;
|
||||||
|
|
||||||
for (i = 0; i < 32; ++i)
|
for (i = 0; i < 32; ++i)
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/* Test and measure strcat functions.
|
/* 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.
|
This file is part of the GNU C Library.
|
||||||
Written by Jakub Jelinek <jakub@redhat.com>, 1999.
|
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)
|
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;
|
size_t i;
|
||||||
|
|
||||||
for (i = 0; i < 32; ++i)
|
for (i = 0; i < 32; ++i)
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/* Test and measure strchr functions.
|
/* 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.
|
This file is part of the GNU C Library.
|
||||||
Written by Jakub Jelinek <jakub@redhat.com>, 1999.
|
Written by Jakub Jelinek <jakub@redhat.com>, 1999.
|
||||||
|
|
||||||
@ -34,7 +34,7 @@ simple_strchr (const char *s, int c)
|
|||||||
{
|
{
|
||||||
for (; *s != (char) c; ++s)
|
for (; *s != (char) c; ++s)
|
||||||
if (*s == '\0')
|
if (*s == '\0')
|
||||||
return NULL;
|
return NULL;
|
||||||
return (char *) s;
|
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)
|
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;
|
size_t i;
|
||||||
|
|
||||||
for (i = 0; i < 32; ++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;
|
align &= 7;
|
||||||
if (align + len >= page_size)
|
if (align + len >= page_size)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
for (i = 0; i < len; ++i)
|
for (i = 0; i < len; ++i)
|
||||||
{
|
{
|
||||||
buf1[align + i] = 32 + 23 * i % (max_char - 32);
|
buf1[align + i] = 32 + 23 * i % (max_char - 32);
|
||||||
|
@ -68,7 +68,9 @@ do_one_test (impl_t *impl, const char *s1, const char *s2, int exp_result)
|
|||||||
|
|
||||||
if (HP_TIMING_AVAIL)
|
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;
|
size_t i;
|
||||||
|
|
||||||
for (i = 0; i < 32; ++i)
|
for (i = 0; i < 32; ++i)
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/* Test and measure strcpy functions.
|
/* 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.
|
This file is part of the GNU C Library.
|
||||||
Written by Jakub Jelinek <jakub@redhat.com>, 1999.
|
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)
|
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;
|
size_t i;
|
||||||
|
|
||||||
for (i = 0; i < 32; ++i)
|
for (i = 0; i < 32; ++i)
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/* Test and measure strlen functions.
|
/* 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.
|
This file is part of the GNU C Library.
|
||||||
Written by Jakub Jelinek <jakub@redhat.com>, 1999.
|
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)
|
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;
|
size_t i;
|
||||||
|
|
||||||
for (i = 0; i < 32; ++i)
|
for (i = 0; i < 32; ++i)
|
||||||
@ -81,7 +83,7 @@ do_test (size_t align, size_t len, int max_char)
|
|||||||
align &= 7;
|
align &= 7;
|
||||||
if (align + len >= page_size)
|
if (align + len >= page_size)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
for (i = 0; i < len; ++i)
|
for (i = 0; i < len; ++i)
|
||||||
buf1[align + i] = 1 + 7 * i % max_char;
|
buf1[align + i] = 1 + 7 * i % max_char;
|
||||||
buf1[align + len] = 0;
|
buf1[align + len] = 0;
|
||||||
|
@ -68,7 +68,9 @@ do_one_test (impl_t *impl, const char *s1, const char *s2, size_t n,
|
|||||||
|
|
||||||
if (HP_TIMING_AVAIL)
|
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;
|
size_t i;
|
||||||
|
|
||||||
for (i = 0; i < 32; ++i)
|
for (i = 0; i < 32; ++i)
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/* Test and measure strpbrk functions.
|
/* 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.
|
This file is part of the GNU C Library.
|
||||||
Written by Jakub Jelinek <jakub@redhat.com>, 1999.
|
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)
|
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;
|
size_t i;
|
||||||
|
|
||||||
for (i = 0; i < 32; ++i)
|
for (i = 0; i < 32; ++i)
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/* Test and measure strrchr functions.
|
/* 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.
|
This file is part of the GNU C Library.
|
||||||
Written by Jakub Jelinek <jakub@redhat.com>, 1999.
|
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)
|
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;
|
size_t i;
|
||||||
|
|
||||||
for (i = 0; i < 32; ++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;
|
align &= 7;
|
||||||
if (align + len >= page_size)
|
if (align + len >= page_size)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
for (i = 0; i < len; ++i)
|
for (i = 0; i < len; ++i)
|
||||||
{
|
{
|
||||||
buf1[align + i] = random () & max_char;
|
buf1[align + i] = random () & max_char;
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/* Test and measure strspn functions.
|
/* 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.
|
This file is part of the GNU C Library.
|
||||||
Written by Jakub Jelinek <jakub@redhat.com>, 1999.
|
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)
|
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;
|
size_t i;
|
||||||
|
|
||||||
for (i = 0; i < 32; ++i)
|
for (i = 0; i < 32; ++i)
|
||||||
|
Loading…
Reference in New Issue
Block a user