diff options
author | Soeren Sandmann <sandmann@redhat.com> | 2005-08-16 00:40:26 +0000 |
---|---|---|
committer | Søren Sandmann Pedersen <ssp@src.gnome.org> | 2005-08-16 00:40:26 +0000 |
commit | 509d5f07edb47a70c7fd06a572fc9be8f3f21cf7 (patch) | |
tree | 32d28c7b8d1ea350af66ae693fcdaa5d1653b2e2 | |
parent | fbc7b471d23af5b9efa1133aec7776bc99931932 (diff) |
Fix some warnings.
Mon Aug 15 20:39:11 2005 Soeren Sandmann <sandmann@redhat.com>
* binfile.c, process.c, profile.c: Fix some warnings.
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | binfile.c | 14 | ||||
-rw-r--r-- | process.c | 2 | ||||
-rw-r--r-- | profile.c | 8 | ||||
-rw-r--r-- | sfile.c | 2 | ||||
-rw-r--r-- | sfile.h | 4 |
6 files changed, 12 insertions, 22 deletions
@@ -1,3 +1,7 @@ +Mon Aug 15 20:39:11 2005 Soeren Sandmann <sandmann@redhat.com> + + * binfile.c, process.c, profile.c: Fix some warnings. + Mon Aug 1 23:49:51 2005 Soeren Sandmann <sandmann@redhat.com> * module/sysprof-module.c (REG_INS_PTR): Add support for @@ -357,26 +357,12 @@ read_symbols (BinFile *bf) if ((bfd_symbols[i]->flags & BSF_FUNCTION) && (bfd_symbols[i]->section == text_section)) { - char *name; - /* Store the address in file coordinates: * - all addresses are already offset by section->vma * - the section is positioned at section->filepos */ -#if 0 - g_print ("file: %s\n", bf->filename); - g_print ("vma: %p\n", text_section->vma); - g_print ("vma: %p\n", text_section->filepos); -#endif - symbol.address = bfd_asymbol_value (bfd_symbols[i]) - load_address; symbol.name = demangle (bfd, bfd_asymbol_name (bfd_symbols[i])); -#if 0 - symbol.name = g_strdup_printf ("%s (%s)", name, bf->filename); - symbol.name = g_strdup (name); - g_print ("symbol: %s (%s) %p\n", name, bf->filename, symbol.address); -#endif - g_array_append_vals (symbols, &symbol, 1); } } @@ -296,7 +296,7 @@ static char * get_pidname (int pid) { if (pid == -1) - return g_strdup_printf ("kernel", pid); + return g_strdup_printf ("kernel"); else return g_strdup_printf ("pid %d", pid); } @@ -222,8 +222,8 @@ profile_load (const char *filename, GError **err) sfile_begin_get_record (input, "object"); sfile_get_string (input, "name", &obj->name); - sfile_get_integer (input, "total", &obj->total); - sfile_get_integer (input, "self", &obj->self); + sfile_get_integer (input, "total", (gint32 *)&obj->total); + sfile_get_integer (input, "self", (gint32 *)&obj->self); sfile_end_get (input, "object", obj); } @@ -241,8 +241,8 @@ profile_load (const char *filename, GError **err) sfile_get_pointer (input, "siblings", (gpointer *)&node->siblings); sfile_get_pointer (input, "children", (gpointer *)&node->children); sfile_get_pointer (input, "parent", (gpointer *)&node->parent); - sfile_get_integer (input, "total", &node->total); - sfile_get_integer (input, "self", &node->self); + sfile_get_integer (input, "total", (gint32 *)&node->total); + sfile_get_integer (input, "self", (gint32 *)&node->self); sfile_get_integer (input, "toplevel", &node->toplevel); sfile_end_get (input, "node", node); @@ -720,7 +720,7 @@ sfile_get_pointer (SFileInput *file, void sfile_get_integer (SFileInput *file, const char *name, - int *integer) + gint32 *integer) { Instruction *instruction; @@ -89,9 +89,9 @@ int sfile_begin_get_list (SFileInput *file, void sfile_get_pointer (SFileInput *file, const char *name, gpointer *pointer); -void sfile_get_integer (SFileInput *file, +void sfile_get_integer (SFileInput *file, const char *name, - int *integer); + gint32 *integer); void sfile_get_string (SFileInput *file, const char *name, char **string); |