mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-10 01:51:03 +09:00
LibC: Enable compiler warnings for scanf and strftime format strings
This commit is contained in:
parent
e665ad92af
commit
b990fc5d3a
Notes:
sideshowbarker
2024-07-19 01:59:31 +09:00
Author: https://github.com/ccapitalK
Commit: b990fc5d3a
Pull-request: https://github.com/SerenityOS/serenity/pull/4532
Reviewed-by: https://github.com/ADKaster
2 changed files with 6 additions and 6 deletions
|
@ -101,11 +101,11 @@ int putc(int ch, FILE*);
|
|||
int puts(const char*);
|
||||
int fputs(const char*, FILE*);
|
||||
void perror(const char*);
|
||||
int scanf(const char* fmt, ...);
|
||||
int sscanf(const char* str, const char* fmt, ...);
|
||||
int fscanf(FILE*, const char* fmt, ...);
|
||||
int vfscanf(FILE*, const char*, va_list);
|
||||
int vsscanf(const char*, const char*, va_list);
|
||||
int scanf(const char* fmt, ...) __attribute__((format(scanf, 1, 2)));
|
||||
int sscanf(const char* str, const char* fmt, ...) __attribute__((format(scanf, 2, 3)));
|
||||
int fscanf(FILE*, const char* fmt, ...) __attribute__((format(scanf, 2, 3)));
|
||||
int vfscanf(FILE*, const char*, va_list) __attribute__((format(scanf, 2, 0)));
|
||||
int vsscanf(const char*, const char*, va_list) __attribute__((format(scanf, 2, 0)));
|
||||
int setvbuf(FILE*, char* buf, int mode, size_t);
|
||||
void setbuf(FILE*, char* buf);
|
||||
void setlinebuf(FILE*);
|
||||
|
|
|
@ -86,6 +86,6 @@ struct tm* gmtime_r(const time_t* timep, struct tm* result);
|
|||
struct tm* localtime_r(const time_t* timep, struct tm* result);
|
||||
|
||||
double difftime(time_t, time_t);
|
||||
size_t strftime(char* s, size_t max, const char* format, const struct tm*);
|
||||
size_t strftime(char* s, size_t max, const char* format, const struct tm*) __attribute__((format(strftime, 3, 0)));
|
||||
|
||||
__END_DECLS
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue