mirror of
https://github.com/RGBCube/serenity
synced 2025-05-25 20:45:06 +00:00
Fix a bunch of compiler warnings. Not all, but a lot.
This commit is contained in:
parent
15fb917f28
commit
901b7d5d91
10 changed files with 29 additions and 191 deletions
|
@ -34,8 +34,8 @@ double round(double);
|
|||
float roundf(float);
|
||||
double fabs(double);
|
||||
float fabsf(float);
|
||||
double fmod(double);
|
||||
float fmodf(float);
|
||||
double fmod(double, double);
|
||||
float fmodf(float, float);
|
||||
double exp(double);
|
||||
float expf(float);
|
||||
double frexp(double, int* exp);
|
||||
|
@ -49,7 +49,7 @@ float sqrtf(float);
|
|||
double modf(double, double*);
|
||||
float modff(float, float*);
|
||||
double ldexp(double, int exp);
|
||||
double ldexpf(float, int exp);
|
||||
float ldexpf(float, int exp);
|
||||
|
||||
double pow(double x, double y);
|
||||
|
||||
|
|
|
@ -15,6 +15,8 @@ char* BC;
|
|||
|
||||
int tgetent(char* bp, const char* name)
|
||||
{
|
||||
(void)bp;
|
||||
(void)name;
|
||||
#ifdef TERMCAP_DEBUG
|
||||
fprintf(stderr, "tgetent: bp=%p, name='%s'\n", bp, name);
|
||||
#endif
|
||||
|
@ -67,7 +69,7 @@ void ensure_caps()
|
|||
caps->set("li", "25");
|
||||
}
|
||||
|
||||
char* tgetstr(char* id, char** area)
|
||||
char* tgetstr(const char* id, char** area)
|
||||
{
|
||||
ensure_caps();
|
||||
#ifdef TERMCAP_DEBUG
|
||||
|
@ -85,8 +87,9 @@ char* tgetstr(char* id, char** area)
|
|||
return nullptr;
|
||||
}
|
||||
|
||||
int tgetflag(char* id)
|
||||
int tgetflag(const char* id)
|
||||
{
|
||||
(void)id;
|
||||
#ifdef TERMCAP_DEBUG
|
||||
fprintf(stderr, "tgetflag: '%s'\n", id);
|
||||
#endif
|
||||
|
@ -96,7 +99,7 @@ int tgetflag(char* id)
|
|||
return 0;
|
||||
}
|
||||
|
||||
int tgetnum(char* id)
|
||||
int tgetnum(const char* id)
|
||||
{
|
||||
#ifdef TERMCAP_DEBUG
|
||||
fprintf(stderr, "tgetnum: '%s'\n", id);
|
||||
|
@ -109,11 +112,15 @@ int tgetnum(char* id)
|
|||
|
||||
char* tgoto(const char* cap, int col, int row)
|
||||
{
|
||||
(void)cap;
|
||||
(void)col;
|
||||
(void)row;
|
||||
assert(false);
|
||||
}
|
||||
|
||||
int tputs(const char* str, int affcnt, int (*putc)(int))
|
||||
{
|
||||
(void)affcnt;
|
||||
size_t len = strlen(str);
|
||||
for (size_t i = 0; i < len; ++i)
|
||||
putc(str[i]);
|
||||
|
|
|
@ -9,9 +9,9 @@ extern char* UP;
|
|||
extern char* BC;
|
||||
|
||||
int tgetent(char* bp, const char* name);
|
||||
int tgetflag(char* id);
|
||||
int tgetnum(char* id);
|
||||
char* tgetstr(char* id, char** area);
|
||||
int tgetflag(const char* id);
|
||||
int tgetnum(const char* id);
|
||||
char* tgetstr(const char* id, char** area);
|
||||
char* tgoto(const char* cap, int col, int row);
|
||||
int tputs(const char* str, int affcnt, int (*putc)(int));
|
||||
|
||||
|
|
|
@ -94,7 +94,7 @@ char *asctime(const struct tm*)
|
|||
assert(false);
|
||||
}
|
||||
|
||||
size_t strftime(char *s, size_t max, const char *format, const struct tm *tm)
|
||||
size_t strftime(char*, size_t, const char*, const struct tm*)
|
||||
{
|
||||
assert(false);
|
||||
}
|
||||
|
|
|
@ -16,6 +16,9 @@ extern "C" {
|
|||
|
||||
int chown(const char* pathname, uid_t owner, gid_t group)
|
||||
{
|
||||
(void)pathname;
|
||||
(void)owner;
|
||||
(void)group;
|
||||
assert(false);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue