1. Wez Furlong
  2. gimli

Commits

Wez Furlong  committed 1db7ec1

Fix up a bunch of compiler warnings

  • Participants
  • Parent commits 8bfe5b2
  • Branches default

Comments (0)

Files changed (7)

File dwarf-read.c

View file
       type = gimli_dwarf_die_get_attr(kid, DW_AT_type);
       if (type) {
         ptype = load_type(file, type);
-        gimli_type_function_add_parameter(t, pname ? pname->ptr : NULL, ptype);
+        gimli_type_function_add_parameter(t,
+            pname ? (char*)pname->ptr : NULL, ptype);
       }
       continue;
     }
   }
 
   var = calloc(1, sizeof(*var));
-  var->varname = name ? name->ptr : NULL;
+  var->varname = name ? (char*)name->ptr : NULL;
   var->addr = res;
   var->proc = frame->cur.proc;
   var->type = load_type(m->objfile, type);

File elf-read.c

View file
   shdr = gimli_get_elf_section_by_name(elf, name);
   if (!shdr) return NULL;
   data = calloc(1, sizeof(*data));
-  data->data = (char*)gimli_get_section_data(elf, shdr->section_no);
+  data->data = (uint8_t*)gimli_get_section_data(elf, shdr->section_no);
   data->size = shdr->sh_size;
   data->offset = shdr->sh_offset;
   data->addr = shdr->sh_addr;
       }
     }
   }
-//  printf("e_shstrndx is %d\n", elf->e_shstrndx); 
+//  printf("e_shstrndx is %d\n", elf->e_shstrndx);
   /* now make a pass through the sections to find out their names */
   STAILQ_FOREACH(s, &elf->sections, shdrs) {
     s->name = (char*)gimli_elf_get_string(elf, elf->e_shstrndx, s->sh_name);

File impl.h

View file
 
 #include "queue.h"
 
+#include <ctype.h>
 #include <signal.h>
 #include <sys/types.h>
 #include <sys/wait.h>

File linux.c

View file
   return 0;
 }
 
-static child_stopped = 0;
+static int child_stopped = 0;
 
 static void child_handler(int signo)
 {

File print.c

View file
         snprintf(addrkey, sizeof(addrkey), "%p:%" PRIx64, t, addr);
         if (gimli_hash_find(derefd, addrkey, &dummy)) {
           printf(" " PTRFMT " [deref'd above]\n", addr);
-          return;
+          return GIMLI_ITER_CONT;
         }
         if (!gimli_hash_insert(derefd, addrkey, NULL)) {
           printf(" " PTRFMT " <hash insert failed>\n", addr);
-          return;
+          return GIMLI_ITER_CONT;
         }
 
         printf(" " PTRFMT " = {\n", addr);

File proc.c

View file
   }
 
   switch (mem->map_type) {
+    case gimli_mem_ref_is_relative:
+      break;
     case gimli_mem_ref_is_malloc:
       free(mem->base);
       mem->base = NULL;
+      break;
+    case gimli_mem_ref_is_mmap:
+      munmap(mem->base, mem->size);
+      mem->base = NULL;
+      break;
   }
 
   free(mem);

File wedgie.c

View file
 #include <signal.h>
 #include <sys/ucontext.h>
 #include <sys/time.h>
-  
+#include <unistd.h>
+
 volatile struct gimli_heartbeat *hb;
 
 typedef int wedgie_t;