comparison src/gtklog.c @ 12600:e856f985a0b9

[gaim-migrate @ 14934] Enable the extra warnings regardless of --enable-debug. Enable FORTIFY_SOURCE regardless of --enable-debug, adding a --disable-fortify flag to configure. Enable (well, stop disabling) the missing initializer warnings. This leads to warnings with: GValue v = {0,}; that must be worked around. Basically, instead of: GValue v = {0,}; ... g_value_init(&v, G_TYPE_FOO); /* or other use of the GValue */ We'd need to do: GValue v; ... v.g_type = 0; g_value_init(&v, G_TYPE_FOO); /* or other use of the GValue */ Fix several cases of missing initializers. I don't think any of these are bugs, but having this warning seems like a good idea. It might prevent us from making a mistake in the future. While I was fixing missing initializers, I optimized substitute_simple_word in plugins/spellchk.c, in the same way as I did substitute_word before. Yes, I'm bad for committing these together. Added a --enable-fatal-asserts flag to configure. As the name implies, this makes g_return_... guards fatal. This is a useful flag to run on a debug copy of Gaim. It will make it very clear if your changes have triggered one of these guards. It's also useful in detecting g_return_... abuse, which helps prevent crashes if Gaim is compiled with G_DISABLE_ASSERT defined. committer: Tailor Script <tailor@pidgin.im>
author Richard Laager <rlaager@wiktel.com>
date Wed, 21 Dec 2005 18:36:19 +0000
parents 375f1f3817a8
children cb36bc2db7c5
comparison
equal deleted inserted replaced
12599:e94c33909aa6 12600:e856f985a0b9
173 gtk_tree_view_expand_row(tv, path, FALSE); 173 gtk_tree_view_expand_row(tv, path, FALSE);
174 } 174 }
175 175
176 static void log_select_cb(GtkTreeSelection *sel, GaimGtkLogViewer *viewer) { 176 static void log_select_cb(GtkTreeSelection *sel, GaimGtkLogViewer *viewer) {
177 GtkTreeIter iter; 177 GtkTreeIter iter;
178 GValue val = { 0, }; 178 GValue val;
179 GtkTreeModel *model = GTK_TREE_MODEL(viewer->treestore); 179 GtkTreeModel *model = GTK_TREE_MODEL(viewer->treestore);
180 GaimLog *log = NULL; 180 GaimLog *log = NULL;
181 GdkCursor *cursor; 181 GdkCursor *cursor;
182 GaimLogReadFlags flags; 182 GaimLogReadFlags flags;
183 char *read = NULL; 183 char *read = NULL;
184 char time[64]; 184 char time[64];
185 185
186 if (!gtk_tree_selection_get_selected(sel, &model, &iter)) 186 if (!gtk_tree_selection_get_selected(sel, &model, &iter))
187 return; 187 return;
188
189 val.g_type = 0;
188 gtk_tree_model_get_value (model, &iter, 1, &val); 190 gtk_tree_model_get_value (model, &iter, 1, &val);
189 log = g_value_get_pointer(&val); 191 log = g_value_get_pointer(&val);
190 g_value_unset(&val); 192 g_value_unset(&val);
191 193
192 if (log == NULL) 194 if (log == NULL)