Browse Source

Fixed 3 warnings

Devine Lu Linvega 5 years ago
parent
commit
f2b657aa1d
3 changed files with 2 additions and 5 deletions
  1. 1 1
      devices/posixfs.c
  2. 0 3
      devices/sdl2.c
  3. 1 1
      sledge/writer.c

+ 1 - 1
devices/posixfs.c

@@ -62,7 +62,7 @@ Cell* posixfs_open(Cell* cpath) {
       if (f>-1) {
         Cell* res;
         
-        printf("[posixfs] trying to read file of len %zu...\r\n",len);
+        printf("[posixfs] trying to read file of len %zd...\r\n",len);
         res = alloc_num_bytes(len);
         read(f, res->ar.addr, len);
         close(f);

+ 0 - 3
devices/sdl2.c

@@ -239,9 +239,6 @@ Cell* mouse_open(Cell* cpath) {
 
 Cell* mouse_read(Cell* stream) {
   mouse_buttons = SDL_GetMouseState(&mouse_x, &mouse_y);
-
-  int mouse_dx = mouse_x - last_mouse_x;
-  int mouse_dy = mouse_y - last_mouse_y;
   Cell* res = alloc_cons(alloc_cons(alloc_int(mouse_x/SCALE),alloc_int(mouse_y/SCALE)),alloc_int(mouse_buttons));
   last_mouse_x = mouse_x;
   last_mouse_y = mouse_y;

+ 1 - 1
sledge/writer.c

@@ -163,7 +163,7 @@ char* write_(Cell* cell, char* buffer, int in_list, int bufsize) {
       snprintf(buffer, bufsize, "<stream:null>");
     }
   } else {
-    snprintf(buffer, bufsize, "<tag:%ld>", cell->tag);
+    snprintf(buffer, bufsize, "<tag:%zd>", cell->tag);
   }
   return buffer;
 }