[alleyoop] fixed compile warnings
- From: Jeffrey Stedfast <fejj src gnome org>
- To: svn-commits-list gnome org
- Subject: [alleyoop] fixed compile warnings
- Date: Fri, 24 Apr 2009 12:47:25 -0400 (EDT)
commit dfa71aa0122a874ed63aa8bd863c26fa1c72a139
Author: Jeffrey Stedfast <fejj gnome org>
Date: Fri Apr 24 12:41:34 2009 -0400
fixed compile warnings
2009-04-24 Jeffrey Stedfast <fejj novell com>
Patch by Petr Uzel <petr uzel suse cz>
* src/vgmemcheckprefs.c: #include stdlib.h
(entry_focus_out): Use strcmp for key comparisons.
* src/vghelgrindprefs.c: #include stdlib.h
(decode_hex_value): Fixed printf hex-formatter.
(menu_item_activated): Use strcmp for key comparison.
(option_menu_new): Same.
(helgrind_prefs_get_argv): Here too.
* src/vggeneralprefs.c (general_prefs_get_argv): Use strcmp for
key comparison rather than a pointer compare.
* src/vgerror.c (vg_error_parser_step): Removed unused variable.
* src/vgdefaultview.c (tree_button_press): Return FALSE from
non-void function.
---
ChangeLog | 21 +++++++++++++++++++++
src/vgdefaultview.c | 2 +-
src/vgerror.c | 1 -
src/vggeneralprefs.c | 2 +-
src/vghelgrindprefs.c | 9 +++++----
src/vgmemcheckprefs.c | 3 ++-
6 files changed, 30 insertions(+), 8 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index af8d659..06ef1b1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,24 @@
+2009-04-24 Jeffrey Stedfast <fejj novell com>
+
+ Patch by Petr Uzel <petr uzel suse cz>
+
+ * src/vgmemcheckprefs.c: #include stdlib.h
+ (entry_focus_out): Use strcmp for key comparisons.
+
+ * src/vghelgrindprefs.c: #include stdlib.h
+ (decode_hex_value): Fixed printf hex-formatter.
+ (menu_item_activated): Use strcmp for key comparison.
+ (option_menu_new): Same.
+ (helgrind_prefs_get_argv): Here too.
+
+ * src/vggeneralprefs.c (general_prefs_get_argv): Use strcmp for
+ key comparison rather than a pointer compare.
+
+ * src/vgerror.c (vg_error_parser_step): Removed unused variable.
+
+ * src/vgdefaultview.c (tree_button_press): Return FALSE from
+ non-void function.
+
2009-03-08 Jeffrey Stedfast <fejj novell com>
* src/alleyoop.schemas: Updated.
diff --git a/src/vgdefaultview.c b/src/vgdefaultview.c
index fcbe130..a3628fe 100644
--- a/src/vgdefaultview.c
+++ b/src/vgdefaultview.c
@@ -1221,7 +1221,7 @@ tree_button_press (GtkWidget *treeview, GdkEventButton *event, gpointer user_dat
GtkWidget *menu;
if (!gtk_tree_view_get_path_at_pos ((GtkTreeView *) treeview, event->x, event->y, &path, NULL, NULL, NULL))
- return;
+ return FALSE;
/* make sure the correct row is selected before continuing */
selection = gtk_tree_view_get_selection ((GtkTreeView *) treeview);
diff --git a/src/vgerror.c b/src/vgerror.c
index bd58008..0b55bf5 100644
--- a/src/vgerror.c
+++ b/src/vgerror.c
@@ -455,7 +455,6 @@ vg_error_parser_step (VgErrorParser *parser)
unsigned char *start, *end;
timestamp_t stamp;
vgthread_t thread;
- unsigned int num;
int state, ret;
VgError *err;
Parser *priv;
diff --git a/src/vggeneralprefs.c b/src/vggeneralprefs.c
index ff9893c..8c72b1c 100644
--- a/src/vggeneralprefs.c
+++ b/src/vggeneralprefs.c
@@ -361,7 +361,7 @@ general_prefs_get_argv (VgToolPrefs *prefs, const char *tool, GPtrArray *argv)
continue;
}
- if (general_args[i].key == SUPPRESSIONS_KEY &&
+ if (!strcmp (general_args[i].key, SUPPRESSIONS_KEY) &&
(stat (str, &st) == -1 || !S_ISREG (st.st_mode))) {
general_args[i].buf = NULL;
g_free (str);
diff --git a/src/vghelgrindprefs.c b/src/vghelgrindprefs.c
index 371d40d..2985271 100644
--- a/src/vghelgrindprefs.c
+++ b/src/vghelgrindprefs.c
@@ -23,6 +23,7 @@
#endif
#include <string.h>
+#include <stdlib.h>
#include <gconf/gconf-client.h>
#include <libgnome/gnome-i18n.h>
@@ -115,7 +116,7 @@ decode_hex_value (const char *text)
if (inend == text)
return NULL;
- return g_strdup_printf ("0x%X", retval);
+ return g_strdup_printf ("0x%lX", retval);
}
static gboolean
@@ -158,7 +159,7 @@ menu_item_activated (GtkMenuItem *item, const char *key)
str = g_object_get_data ((GObject *) item, "value");
- if (key == TRACE_LEVEL_KEY) {
+ if (!strcmp (key, TRACE_LEVEL_KEY)) {
val = strtol (str, NULL, 10);
gconf_client_set_int (gconf, key, val, NULL);
} else {
@@ -178,7 +179,7 @@ option_menu_new (GConfClient *gconf, const char **opts, int nopts, const char *k
int history, i;
char *str;
- if (key == TRACE_LEVEL_KEY) {
+ if (!strcmp (key, TRACE_LEVEL_KEY)) {
history = gconf_client_get_int (gconf, key, NULL);
str = NULL;
} else {
@@ -333,7 +334,7 @@ helgrind_prefs_get_argv (VgToolPrefs *prefs, const char *tool, GPtrArray *argv)
if (helgrind_args[i].type == ARG_TYPE_STRING) {
if (!(str = gconf_client_get_string (gconf, key, NULL)) || *str == '\0') {
- if (key == TRACE_ADDR_KEY)
+ if (!strcmp (key, TRACE_ADDR_KEY))
enable_trace_addr = FALSE;
g_free (str);
diff --git a/src/vgmemcheckprefs.c b/src/vgmemcheckprefs.c
index f907a03..03e3d9d 100644
--- a/src/vgmemcheckprefs.c
+++ b/src/vgmemcheckprefs.c
@@ -23,6 +23,7 @@
#endif
#include <string.h>
+#include <stdlib.h>
#include <limits.h>
#include <ctype.h>
@@ -220,7 +221,7 @@ entry_focus_out (GtkEntry *entry, GdkEventFocus *event, const char *key)
gconf = gconf_client_get_default ();
if ((text = gtk_entry_get_text (entry))) {
- if (key == IGNORE_RANGES_KEY)
+ if (!strcmp (key, IGNORE_RANGES_KEY))
str = decode_hex_range (text);
else
str = decode_hex_value (text);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]