Skip to content

Commit

Permalink
Update.
Browse files Browse the repository at this point in the history
	* 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.
  • Loading branch information
Ulrich Drepper committed Apr 17, 2003
1 parent 9e9f1f1 commit c9df3df
Show file tree
Hide file tree
Showing 15 changed files with 73 additions and 31 deletions.
14 changes: 14 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,20 @@

* string/test-strncpy.c (do_one_test): Mark start and stop as
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>

Expand Down
8 changes: 5 additions & 3 deletions string/test-memchr.c
Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -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)
Expand All @@ -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;
Expand Down
4 changes: 3 additions & 1 deletion string/test-memcmp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
8 changes: 5 additions & 3 deletions string/test-memcpy.c
Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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;
Expand Down
6 changes: 4 additions & 2 deletions string/test-memmove.c
Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -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)
Expand Down
6 changes: 4 additions & 2 deletions string/test-memset.c
Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -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)
Expand Down
6 changes: 4 additions & 2 deletions string/test-strcat.c
Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -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)
Expand Down
10 changes: 6 additions & 4 deletions string/test-strchr.c
Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -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;
}

Expand Down Expand Up @@ -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)
Expand All @@ -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);
Expand Down
4 changes: 3 additions & 1 deletion string/test-strcmp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
6 changes: 4 additions & 2 deletions string/test-strcpy.c
Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -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)
Expand Down
8 changes: 5 additions & 3 deletions string/test-strlen.c
Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -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)
Expand All @@ -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;
Expand Down
4 changes: 3 additions & 1 deletion string/test-strncmp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
6 changes: 4 additions & 2 deletions string/test-strpbrk.c
Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -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)
Expand Down
8 changes: 5 additions & 3 deletions string/test-strrchr.c
Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -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)
Expand All @@ -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;
Expand Down
6 changes: 4 additions & 2 deletions string/test-strspn.c
Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit c9df3df

Please sign in to comment.