lib: fix C compiler warnings in standard library
authorAlexis Laferrière <alexis.laf@xymus.net>
Tue, 9 Jun 2015 15:24:20 +0000 (11:24 -0400)
committerAlexis Laferrière <alexis.laf@xymus.net>
Tue, 9 Jun 2015 16:56:19 +0000 (12:56 -0400)
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>

lib/standard/file.nit
lib/standard/time.nit

index 46c52ec..22e2b09 100644 (file)
@@ -1182,7 +1182,6 @@ redef class Sys
        private fun intern_poll(in_fds: Array[Int], out_fds: Array[Int]) : nullable Int is extern import Array[Int].length, Array[Int].[], Int.as(nullable Int) `{
                int in_len, out_len, total_len;
                struct pollfd *c_fds;
-               sigset_t sigmask;
                int i;
                int first_polled_fd = -1;
                int result;
index 99a9f35..fe2d4c5 100644 (file)
@@ -129,12 +129,11 @@ extern class Tm `{struct tm *`}
        # TODO document allowed format.
        fun strftime(format: String): String import String.to_cstring, NativeString.to_s `{
                char* buf, *c_format;
-               size_t res;
 
                buf = (char*)malloc(100);
                c_format = String_to_cstring(format);
 
-               res = strftime(buf, 100, c_format, self);
+               strftime(buf, 100, c_format, self);
                String s = NativeString_to_s_with_copy(buf);
                free(buf);
                return s;