summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSoeren Sandmann <sandmann@redhat.com>2005-08-16 00:40:26 +0000
committerSøren Sandmann Pedersen <ssp@src.gnome.org>2005-08-16 00:40:26 +0000
commit509d5f07edb47a70c7fd06a572fc9be8f3f21cf7 (patch)
tree32d28c7b8d1ea350af66ae693fcdaa5d1653b2e2
parentfbc7b471d23af5b9efa1133aec7776bc99931932 (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--ChangeLog4
-rw-r--r--binfile.c14
-rw-r--r--process.c2
-rw-r--r--profile.c8
-rw-r--r--sfile.c2
-rw-r--r--sfile.h4
6 files changed, 12 insertions, 22 deletions
diff --git a/ChangeLog b/ChangeLog
index 471397d..846bbae 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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
diff --git a/binfile.c b/binfile.c
index cd0e34d..ff66f90 100644
--- a/binfile.c
+++ b/binfile.c
@@ -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);
}
}
diff --git a/process.c b/process.c
index f5b3f4a..a98ca99 100644
--- a/process.c
+++ b/process.c
@@ -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);
}
diff --git a/profile.c b/profile.c
index dedcde3..f3dd0e9 100644
--- a/profile.c
+++ b/profile.c
@@ -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);
diff --git a/sfile.c b/sfile.c
index 4dd3485..31a152c 100644
--- a/sfile.c
+++ b/sfile.c
@@ -720,7 +720,7 @@ sfile_get_pointer (SFileInput *file,
void
sfile_get_integer (SFileInput *file,
const char *name,
- int *integer)
+ gint32 *integer)
{
Instruction *instruction;
diff --git a/sfile.h b/sfile.h
index 838f7d8..92a1810 100644
--- a/sfile.h
+++ b/sfile.h
@@ -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);