about summary refs log tree commit diff
path: root/string/bug-strspn1.c
Commit message (Collapse)AuthorAgeFilesLines
* Remove "Contributed by" linesSiddhesh Poyarekar2021-09-031-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | We stopped adding "Contributed by" or similar lines in sources in 2012 in favour of git logs and keeping the Contributors section of the glibc manual up to date. Removing these lines makes the license header a bit more consistent across files and also removes the possibility of error in attribution when license blocks or files are copied across since the contributed-by lines don't actually reflect reality in those cases. Move all "Contributed by" and similar lines (Written by, Test by, etc.) into a new file CONTRIBUTED-BY to retain record of these contributions. These contributors are also mentioned in manual/contrib.texi, so we just maintain this additional record as a courtesy to the earlier developers. The following scripts were used to filter a list of files to edit in place and to clean up the CONTRIBUTED-BY file respectively. These were not added to the glibc sources because they're not expected to be of any use in future given that this is a one time task: https://gist.github.com/siddhesh/b5ecac94eabfd72ed2916d6d8157e7dc https://gist.github.com/siddhesh/15ea1f5e435ace9774f485030695ee02 Reviewed-by: Carlos O'Donell <carlos@redhat.com>
* Fix bug-strspn1.c, bug-strpbrk1.c build with GCC mainline.Joseph Myers2018-06-201-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | Building the testsuite with GCC mainline fails with: bug-strspn1.c: In function 'main': bug-strspn1.c:14:3: error: right-hand operand of comma expression has no effect [-Werror=unused-value] strspn (b++, ""); ^~~~~~~~~~~~~~~~ and a similar error for bug-strpbrk1.c. I'm not sure what GCC change introduced this, and the wording of the message is a bit off (in the source it's not a comma expression, that must reflect GCC's IR). But the warning is correct (strspn is a pure function, the call is useless, and if there wasn't an argument with a side effect much older GCC would have warned); the point of the test is to verify that the side effect in an argument still occurs for this useless call that can otherwise be optimized to an (unused) constant (testing for a bug there once was in an old strspn macro). This patch duly arranges for the warning to be disabled for this code. Tested with build-many-glibcs.py for aarch64-linux-gnu. * string/bug-strpbrk1.c: Include <libc-diag.h>. (main): Disable -Wunused-value around call to strpbrk. * string/bug-strspn1.c: Include <libc-diag.h>. (main): Disable -Wunused-value around call to strspn.
* * malloc/memusagestat.c (main): Use return instead of exit to Andreas Jaeger2000-12-311-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | avoid warning. * io/pwd.c (main): Likewise. * iconvdata/tst-table-from.c (main): Likewise. * ctype/test_ctype.c (main): Likewise. * setjmp/tst-setjmp.c (main): Likewise. * signal/tst-signal.c (main): Likewise. * stdlib/tst-strtol.c (main): Likewise. * stdlib/tst-strtod.c (main): Likewise. * stdlib/tst-strtoll.c (main): Likewise. * stdlib/tst-xpg-basename.c (main): Likewise. * dirent/tst-seekdir.c (main): Likewise. * grp/testgrp.c (main): Likewise. * inet/test_ifindex.c (main): Likewise. * io/test-utime.c (main): Likewise. * posix/test-vfork.c (main): Likewise. * posix/testfnm.c (main): Likewise. * stdio-common/temptest.c (main): Likewise. * stdio-common/test_rdwr.c (main): Likewise. * stdio-common/tst-fileno.c (main): Likewise. * stdio-common/tst-sscanf.c (main): Likewise. * stdio-common/tstscanf.c (main): Likewise. * string/bug-strncat1.c (main): Likewise. * string/bug-strpbrk1.c (main): Likewise. * string/bug-strspn1.c (main): Likewise. * string/test-ffs.c (main): Likewise. * string/tst-inlcall.c (main): Likewise. * string/tst-svc.c (main): Likewise. * timezone/test-tz.c (main): Likewise. * wctype/test_wcfuncs.c (main): Likewise. * wctype/test_wctype.c (main): Likewise. * stdlib/tst-random.c: Add attribute noreturn to fail.
* Update.Ulrich Drepper2000-10-311-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * posix/runtests.c (main): Don't use exit() to avoid warning with broken compilers. * string/bug-strncat1.c: Undefine __USE_STRING_INLINES before defining it again to avoid warning. * string/bug-strpbrk1.c: Likewise. * string/bug-strspn1.c: Likewise. 2000-10-29 Bruno Haible <haible@clisp.cons.org> * locale/C-translit.h.in: Include more rules from translit_neutral. Remove a few German and Danish specific rules. * locale/gen-translit.pl: Avoid an error when printing a string containing a '%' character. * locale/C-translit.h: Regenerated. * intl/translit.po: Choose different translations. * intl/tst-translit.c: Update. 2000-10-29 Bruno Haible <haible@clisp.cons.org> * locale/programs/ld-ctype.c (translit_include_t): New type. (locale_ctype_t): Remove translit_copy_locale, translit_copy_repertoire fields, add translit_include field. (ctype_read): After seeing "translit_start" in ignore_content mode, skip the entire translit section, not only one line. Remove dead test for tok_translit_end. Enqueue include statements into a list. Signal error if tok_eof seen before tok_translit_end. (translit_flatten): New function. (allocate_arrays): Call translit_flatten. 2000-10-30 Ulrich Drepper <drepper@redhat.com>
* Update.Ulrich Drepper2000-10-301-0/+18
* string/bits/string2.h (strspn): Evaluate first argument if second is "". (strpbrk): Likewise. * sysdeps/i386/i486/bits/string.h: Likewise. * string/Makefile (tests): Add bug-strspn1 and bug-strpbrk1. * string/bug-strspn1.c: New file. * string/bug-strpbrk1.c: New file. Test cases by Joseph S. Myers <jsm28@cam.ac.uk>. * string/bits/string2.h (strncat): Terminate string correctly. * sysdeps/i386/i486/bits/string.h (strncat): Likewise. * string/Makefile (tests): Add bug-strncat1. * string/bug-strncat1.c: New file. Test case by Joseph S. Myers <jsm28@cam.ac.uk>. 2000-10-27 Ben Collins <bcollins@debian.org> * sysdeps/generic/lockf.c (lockf): Set l_type to F_RDLCK before calling for F_GETLK. 2000-10-29 Ulrich Drepper <drepper@redhat.com>