64 bits warnings fix
authorcompudj <compudj@04897980-b3bd-0310-b5e0-8ef037075253>
Mon, 12 Nov 2007 04:29:55 +0000 (04:29 +0000)
committercompudj <compudj@04897980-b3bd-0310-b5e0-8ef037075253>
Mon, 12 Nov 2007 04:29:55 +0000 (04:29 +0000)
git-svn-id: http://ltt.polymtl.ca/svn@2737 04897980-b3bd-0310-b5e0-8ef037075253

ltt/branches/poly/ltt/marker.c
ltt/branches/poly/ltt/marker.h
ltt/branches/poly/ltt/tracefile.c

index 9da520eb1d1cdb013ff94bc281460e7915c0f208..ce1fc86863f0f9f093820cffe8506ff7914b5200 100644 (file)
@@ -418,7 +418,7 @@ int marker_format_event(LttTrace *trace, GQuark name, const char *format)
   }
   fcopy = g_new(char, strlen(format)+1);
   strcpy(fcopy, format);
-  g_hash_table_insert(trace->markers_format_hash, (gpointer)name,
+  g_hash_table_insert(trace->markers_format_hash, (gpointer)(gulong)name,
     (gpointer)fcopy);
 
   info = marker_get_info_from_name(trace, name);
@@ -456,7 +456,7 @@ int marker_id_event(LttTrace *trace, GQuark name, guint16 id,
         info->format, g_quark_to_string(name));
   head = marker_get_info_from_name(trace, name);
   if (!head)
-    g_hash_table_insert(trace->markers_hash, (gpointer)name,
+    g_hash_table_insert(trace->markers_hash, (gpointer)(gulong)name,
       (gpointer)(gulong)id);
   else {
     struct marker_info *iter;
@@ -464,7 +464,7 @@ int marker_id_event(LttTrace *trace, GQuark name, guint16 id,
       if (iter->name == name)
         found = 1;
     if (!found) {
-      g_hash_table_replace(trace->markers_hash, (gpointer)name,
+      g_hash_table_replace(trace->markers_hash, (gpointer)(gulong)name,
         (gpointer)(gulong)id);
       info->next = head;
     }
index 93f6ff610ebb1b43e1ddb00990c5164f9f8e174b..3d04db8870b142e5fe9e9ac2bfccb796845869e9 100644 (file)
@@ -66,8 +66,8 @@ static inline struct marker_info *marker_get_info_from_name(LttTrace *trace,
   gpointer orig_key, value;
   int res;
 
-  res = g_hash_table_lookup_extended(trace->markers_hash, (gconstpointer)name,
-    &orig_key, &value);
+  res = g_hash_table_lookup_extended(trace->markers_hash,
+    (gconstpointer)(gulong)name, &orig_key, &value);
   if (!res)
     return NULL;
   return marker_get_info_from_id(trace, (guint16)(gulong)value);
@@ -80,7 +80,7 @@ static inline char *marker_get_format_from_name(LttTrace *trace,
   int res;
 
   res = g_hash_table_lookup_extended(trace->markers_format_hash,
-               (gconstpointer)name, &orig_key, &value);
+               (gconstpointer)(gulong)name, &orig_key, &value);
   if (!res)
     return NULL;
   return (char *)value;
index ec3bc4da5e503b29032893c86af0fdfda51d7e73..d026cf91e4740cd786c11ca4e5fb011e8dd00fc4 100644 (file)
@@ -368,7 +368,7 @@ gint ltt_tracefile_open(LttTrace *t, gchar * fileName, LttTracefile *tf)
     perror("Error in allocating memory for buffer of tracefile");
     goto close_file;
   }
-  g_assert( ( (guint)tf->buffer.head&(8-1) ) == 0); // make sure it's aligned.
+  g_assert( ( (gulong)tf->buffer.head&(8-1) ) == 0); // make sure it's aligned.
   
   header = (struct ltt_block_start_header*)tf->buffer.head;
   
@@ -669,8 +669,8 @@ void get_absolute_pathname(const gchar *pathname, gchar * abs_pathname)
 int get_tracefile_name_number(gchar *raw_name,
                               GQuark *name,
                               guint *num,
-                              guint *tid,
-                              guint *pgid,
+                              gulong *tid,
+                              gulong *pgid,
                               guint64 *creation)
 {
   guint raw_name_len = strlen(raw_name);
@@ -881,10 +881,12 @@ int open_tracefiles(LttTrace *trace, gchar *root_path, gchar *relative_path)
       if(ret < 0) continue;
     } else if(S_ISREG(stat_buf.st_mode)) {
       GQuark name;
-      guint num, tid, pgid;
+      guint num;
+      gulong tid, pgid;
       guint64 creation;
       GArray *group;
-      num = tid = pgid = 0;
+      num = 0;
+      tid = pgid = 0;
       creation = 0;
       if(get_tracefile_name_number(rel_path, &name, &num, &tid, &pgid, &creation))
         continue; /* invalid name */
@@ -1933,7 +1935,7 @@ gint map_block(LttTracefile * tf, guint block_num)
     g_assert(0);
     goto map_error;
   }
-  g_assert( ( (guint)tf->buffer.head&(8-1) ) == 0); // make sure it's aligned.
+  g_assert( ( (gulong)tf->buffer.head&(8-1) ) == 0); // make sure it's aligned.
   
 
   tf->buffer.index = block_num;
This page took 0.027783 seconds and 4 git commands to generate.