gaim/gaim

fixed strict aliasing warning
oldstatus
2005-02-16, Daniel Atallah
ecff33e48dd9
Parents c283a8325004
Children f973810b3bc0
fixed strict aliasing warning
--- a/src/gtkprefs.c Wed Feb 16 16:07:38 2005 -0500
+++ b/src/gtkprefs.c Wed Feb 16 21:43:48 2005 -0500
@@ -2267,13 +2267,14 @@
struct away_message *amt;
GtkTreeIter iter;
GtkListStore *ls = GTK_LIST_STORE(gtk_tree_view_get_model(GTK_TREE_VIEW(tv)));
+ GtkTreeModel *model = GTK_TREE_MODEL(ls);
GtkTreeSelection *sel = gtk_tree_view_get_selection(GTK_TREE_VIEW(tv));
GValue val = { 0, };
/* Get the pointer to the away message and pass that */
- if (! gtk_tree_selection_get_selected (sel, (GtkTreeModel**)&ls, &iter))
+ if (! gtk_tree_selection_get_selected (sel, &model, &iter))
return;
- gtk_tree_model_get_value (GTK_TREE_MODEL(ls), &iter, 1, &val);
+ gtk_tree_model_get_value (model, &iter, 1, &val);
amt = g_value_get_pointer (&val);
create_away_mess(NULL, amt);
}
--- a/src/plugin.c Wed Feb 16 16:07:38 2005 -0500
+++ b/src/plugin.c Wed Feb 16 21:43:48 2005 -0500
@@ -193,6 +193,7 @@
plugin = gaim_plugin_new(is_so_file(filename, PLUGIN_EXT), filename);
if (plugin->native_plugin) {
+ gpointer pgaim_init_plugin;
const char *error;
plugin->handle = g_module_open(filename, 0);
@@ -207,7 +208,7 @@
}
if (!g_module_symbol(plugin->handle, "gaim_init_plugin",
- (gpointer *)&gaim_init_plugin)) {
+ &pgaim_init_plugin)) {
g_module_close(plugin->handle);
plugin->handle = NULL;
@@ -219,6 +220,7 @@
return NULL;
}
+ gaim_init_plugin = pgaim_init_plugin;
}
else {
loader = find_loader_for_plugin(plugin);