From 9aac2672e36c9cdcc0407ac51ce215b2a565b447 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20Miku=C5=82a?= Date: Thu, 18 Jul 2019 15:27:05 +0200 Subject: [PATCH] Fix few warnings --- src/ld_so/src/lib.rs | 2 +- tests/stdio/all.c | 2 +- tests/string/strsignal.c | 3 +-- tests/unistd/swab.c | 1 + 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/ld_so/src/lib.rs b/src/ld_so/src/lib.rs index d0adafc0e5..04ba7802a6 100644 --- a/src/ld_so/src/lib.rs +++ b/src/ld_so/src/lib.rs @@ -48,7 +48,7 @@ pub unsafe extern "C" fn _start() { #[naked] #[no_mangle] -pub unsafe extern "C" fn main(argc: isize, argv: *const *const i8) -> usize { +pub unsafe extern "C" fn main(_argc: isize, _argv: *const *const i8) -> usize { // LD 0x1D } diff --git a/tests/stdio/all.c b/tests/stdio/all.c index de7c60ab63..4807b584db 100644 --- a/tests/stdio/all.c +++ b/tests/stdio/all.c @@ -21,7 +21,7 @@ int main(void) { ERROR_IF(fgets, s, == NULL); printf("%s\n", in); - int vb = setvbuf(stdout, 0, _IONBF, 0); + __attribute__((unused)) int vb = setvbuf(stdout, 0, _IONBF, 0); //ERROR_IF(setvbuf, vb, > 0); // TODO: Cannot use this, doesn't set errno //UNEXP_IF(setvbuf, vb, != 0); diff --git a/tests/string/strsignal.c b/tests/string/strsignal.c index 1ddf08630d..490d11f38c 100644 --- a/tests/string/strsignal.c +++ b/tests/string/strsignal.c @@ -7,8 +7,7 @@ int main(void) { puts("# strsignal #"); - char *x = strsignal(SIGHUP); - int res; + const char *x = strsignal(SIGHUP); if (strcmp(x, "Hangup")) { printf("Incorrect strsignal (1), found: .%s.\n", x); exit(EXIT_FAILURE); diff --git a/tests/unistd/swab.c b/tests/unistd/swab.c index c194ff280b..d7927b66fa 100644 --- a/tests/unistd/swab.c +++ b/tests/unistd/swab.c @@ -1,3 +1,4 @@ +#include #include int main(int argc, char ** argv) {