mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-01-24 02:03:06 -05:00
LibC: Don't advertise wrong functions
str{,n}casecmp is supposed to be *only* declared by strings.h, note the trailing 's' in the filename. We don't have any implementation for strlcat; using any strcat variants is a bad idea anyway, given our implementation of AK::String. TODO: Find a way to lint for declared-but-nowhere-defined functions.
This commit is contained in:
parent
d25860f53c
commit
be1e4f28cc
Notes:
sideshowbarker
2024-07-19 02:44:13 +09:00
Author: https://github.com/BenWiederhake Commit: https://github.com/SerenityOS/serenity/commit/be1e4f28cc2 Pull-request: https://github.com/SerenityOS/serenity/pull/3464
1 changed files with 4 additions and 9 deletions
|
@ -36,8 +36,6 @@ size_t strnlen(const char*, size_t maxlen);
|
||||||
|
|
||||||
int strcmp(const char*, const char*);
|
int strcmp(const char*, const char*);
|
||||||
int strncmp(const char*, const char*, size_t);
|
int strncmp(const char*, const char*, size_t);
|
||||||
int strcasecmp(const char*, const char*);
|
|
||||||
int strncasecmp(const char*, const char*, size_t);
|
|
||||||
|
|
||||||
int memcmp(const void*, const void*, size_t);
|
int memcmp(const void*, const void*, size_t);
|
||||||
void* memcpy(void*, const void*, size_t);
|
void* memcpy(void*, const void*, size_t);
|
||||||
|
@ -52,10 +50,8 @@ void* memset(void*, int, size_t);
|
||||||
__attribute__((malloc)) char* strdup(const char*);
|
__attribute__((malloc)) char* strdup(const char*);
|
||||||
__attribute__((malloc)) char* strndup(const char*, size_t);
|
__attribute__((malloc)) char* strndup(const char*, size_t);
|
||||||
|
|
||||||
__attribute__((deprecated("use strlcpy or String::copy_characters_to_buffer")))
|
__attribute__((deprecated("use strlcpy or String::copy_characters_to_buffer"))) char* strcpy(char* dest, const char* src);
|
||||||
char* strcpy(char* dest, const char* src);
|
__attribute__((deprecated("use strlcpy or String::copy_characters_to_buffer"))) char* strncpy(char* dest, const char* src, size_t);
|
||||||
__attribute__((deprecated("use strlcpy or String::copy_characters_to_buffer")))
|
|
||||||
char* strncpy(char* dest, const char* src, size_t);
|
|
||||||
__attribute__((warn_unused_result)) size_t strlcpy(char* dest, const char* src, size_t);
|
__attribute__((warn_unused_result)) size_t strlcpy(char* dest, const char* src, size_t);
|
||||||
|
|
||||||
char* strchr(const char*, int c);
|
char* strchr(const char*, int c);
|
||||||
|
@ -63,9 +59,8 @@ char* strchrnul(const char*, int c);
|
||||||
char* strstr(const char* haystack, const char* needle);
|
char* strstr(const char* haystack, const char* needle);
|
||||||
char* strrchr(const char*, int c);
|
char* strrchr(const char*, int c);
|
||||||
|
|
||||||
__attribute__((deprecated("use strlcat"))) char* strcat(char* dest, const char* src);
|
__attribute__((deprecated("use strncat"))) char* strcat(char* dest, const char* src);
|
||||||
__attribute__((deprecated("use strlcat"))) char* strncat(char* dest, const char* src, size_t);
|
char* strncat(char* dest, const char* src, size_t);
|
||||||
__attribute__((warn_unused_result)) size_t strlcat(char* dest, const char* src, size_t);
|
|
||||||
|
|
||||||
size_t strspn(const char*, const char* accept);
|
size_t strspn(const char*, const char* accept);
|
||||||
size_t strcspn(const char*, const char* reject);
|
size_t strcspn(const char*, const char* reject);
|
||||||
|
|
Loading…
Add table
Reference in a new issue