diff options
author | Andreas Kling <awesomekling@gmail.com> | 2019-02-25 19:05:51 +0100 |
---|---|---|
committer | Andreas Kling <awesomekling@gmail.com> | 2019-02-25 19:05:51 +0100 |
commit | 901b7d5d91b3eacda12dad01211b84a28e1a39a6 (patch) | |
tree | 903ad96735d1e3c06406f363969d43b7cbb17f93 /LibC | |
parent | 15fb917f28505539b05b9b21de0aae7055a5ab2e (diff) | |
download | serenity-901b7d5d91b3eacda12dad01211b84a28e1a39a6.zip |
Fix a bunch of compiler warnings. Not all, but a lot.
Diffstat (limited to 'LibC')
-rw-r--r-- | LibC/math.h | 6 | ||||
-rw-r--r-- | LibC/termcap.cpp | 13 | ||||
-rw-r--r-- | LibC/termcap.h | 6 | ||||
-rw-r--r-- | LibC/time.cpp | 2 | ||||
-rw-r--r-- | LibC/unistd.cpp | 3 |
5 files changed, 20 insertions, 10 deletions
diff --git a/LibC/math.h b/LibC/math.h index 9d416654ea..2c3771a9ab 100644 --- a/LibC/math.h +++ b/LibC/math.h @@ -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); diff --git a/LibC/termcap.cpp b/LibC/termcap.cpp index 0efea01895..9d4e0632ac 100644 --- a/LibC/termcap.cpp +++ b/LibC/termcap.cpp @@ -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]); diff --git a/LibC/termcap.h b/LibC/termcap.h index f2f40ebf83..e9136d9c2b 100644 --- a/LibC/termcap.h +++ b/LibC/termcap.h @@ -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)); diff --git a/LibC/time.cpp b/LibC/time.cpp index e450fe77fc..dc8ed9ceab 100644 --- a/LibC/time.cpp +++ b/LibC/time.cpp @@ -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); } diff --git a/LibC/unistd.cpp b/LibC/unistd.cpp index ac00004d2f..c79760055f 100644 --- a/LibC/unistd.cpp +++ b/LibC/unistd.cpp @@ -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); } |