Corinna Vinschen
422c4f0451
memccpy: fix pointer assignment
...
The local vars dst and src are unsigned pointers, but two assignments
cast their value to signed explicitely. This results in the warning
"pointer targets in assignment from ‘char *’ to ‘unsigned char *’
differ in signedness [-Wpointer-sign]" in case of -Wall.
Fix the cast.
Fixes: d254189b38
("2002-07-23 Jeff Johnston <jjohnstn@redhat.com>")
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2024-01-19 11:51:01 +01:00
CompilerAI Research Group
ad3f9820b1
Fix memccpy to handle end char >= x80
...
- use unsigned char variables for optimized version of memccpy
2023-01-03 14:52:47 -05:00
Yaakov Selkowitz
9087163804
ansification: remove _DEFUN
...
Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
2018-01-17 11:47:26 -06:00
Yaakov Selkowitz
e6321aa6a6
ansification: remove _PTR
...
Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
2018-01-17 11:47:16 -06:00
Yaakov Selkowitz
0bda30e1ff
ansification: remove _CONST
...
Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
2018-01-17 11:47:08 -06:00
Yaakov Selkowitz
6783860a2e
ansification: remove _AND
...
Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
2018-01-17 11:47:05 -06:00
Yaakov Selkowitz
352c8f2f0d
string: remove TRAD_SYNOPSIS
...
Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
2017-12-01 03:41:52 -06:00
Corinna Vinschen
633cf9b5dd
* libc/string/memccpy.c (memccpy): Fix warning about signed-unsigned
...
comparison
* libc/string/memchr.c (memchr): Ditto.
* libc/string/memrchr.c (memrchr): Ditto.
* libc/string/memset.c: (memset): Ditto.
* libc/string/rawmemchr.c (rawmemchr): Ditto.
* libc/string/local.h (__locale_cjk_lang): Fix "function declaration
isn't a prototype" warning.
* libc/string/strcasestr.c (strcasestr): Ditto.
* libc/string/u_strerr.c (_user_strerror): Fix "unused parameter"
warnings.
* libc/string/rawmemchr.c (rawmemchr): Fix comment type
"// ..." -> "/* ... */".
2014-10-09 12:24:56 +00:00
Corinna Vinschen
b143d094ee
* libc/sys/linux/include/netdb.h, libc/sys/linux/net/getaddrinfo.c,
...
libc/sys/linux/net/getnameinfo.c: Add restrict keyword to getnameinfo()
and getaddrinfo() to increase standards compliance and match glibc.
* libc/include/string.h, libc/string/memccpy.c, libc/string/memcpy.c,
libc/string/stpcpy.c, libc/string/stpncpy.c, libc/string/strcat.c,
libc/string/strncat.c, libc/string/strncpy.c, libc/string/strtok.c,
libc/string/strtok_r.c, libc/string/strxfrm.c
libc/machine/microblaze/strcpy.c, libc/machine/xscale/memcpy.c,
libc/machine/cris/memcpy.c: Add __restrict to prototype to
increase standards compliance.
2013-07-23 07:05:31 +00:00
Jeff Johnston
60376287eb
2010-09-21 Craig Howland <howland@LGSInnovations.com>
...
* libc/string/memcpy.c: Do not assign size_t parameter to int.
Use parameter directly, instead.
* libc/string/memccpy.c: Likewise.
* libc/string/mempcpy.c: Likewise.
* libc/string/memmove.c: Likewise.
2010-09-22 03:15:07 +00:00
Jeff Johnston
d254189b38
2002-07-23 Jeff Johnston <jjohnstn@redhat.com>
...
* libc/include/string.h: Add mempcpy, strndup, and _strndup_r
prototypes.
* libc/stdlib/Makefile.am: Remove strdup.c and strdup_r.c.
* libc/stdlib/Makefile.in: Regenerated.
* libc/stdlib/strdup.c: Removed.
* libc/stdlib/strdup_r.c: Removed.
* libc/string/Makefile.am: Add strdup.c, strdup_r.c, memccpy.c,
mempcpy.c, strndup.c, and strndup_r.c.
* libc/string/Makefile.in: Regenerated.
* libc/string/memccpy.c: New file.
* libc/string/mempcpy.c: Ditto.
* libc/string/strndup.c: Ditto.
* libc/string/strndup_r.c: Ditto.
* libc/string/strdup.c: New file moved from stdlib.
* libc/string/strdup_r.c: Ditto.
* libc/string/strings.tex: Add memccpy and mempcpy documentation.
2002-07-23 21:38:00 +00:00