{
data->entry_count = 0;
data->entry_capacity = entry_capacity;
- data->entries = g_malloc (sizeof (SeqPointDataEntry) * entry_capacity);
+ data->entries = (SeqPointDataEntry *)g_malloc (sizeof (SeqPointDataEntry) * entry_capacity);
}
void
fsize = ftell(f);
fseek(f, 0, SEEK_SET);
- buffer_orig = buffer = g_malloc(fsize + 1);
+ buffer_orig = buffer = (guint8 *)g_malloc (fsize + 1);
fread(buffer_orig, fsize, 1, f);
fclose(f);
// Add size of entry_count and native_base_offsets
size += 4 + data->entry_count * 4;
- buffer_orig = buffer = g_malloc (size);
+ buffer_orig = buffer = (guint8 *)g_malloc (size);
encode_var_int (buffer, &buffer, data->entry_count);
fwrite (buffer_orig, 1, buffer - buffer_orig, f);
g_free (buffer_orig);
+ fclose (f);
return TRUE;
}