denemo-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Denemo-devel] Fixing warnings commit.


From: Jeremiah Benham
Subject: Re: [Denemo-devel] Fixing warnings commit.
Date: Sat, 12 Feb 2011 07:51:44 -0600



On Feb 12, 2011, at 3:44 AM, Richard Shann <address@hidden> wrote:


Jeremiah,

I think you will have introduced a bug:


- g_string_append_printf(continuations, "%s%s", g->data, ", or ");

+       g_string_append_printf(continuations, "%s%s", ((GString *)
g->data)->str, ", or ");




This looks wrong!!!! the second is assuming g->data holds a GString *,
not a gchar *. Unless you are fixing a bug here, not just a warning? I
can't test right now.


I looked at the code more closely and it does appear to be gchar. I fixed this in git. I will continue testing.

Thanks,
Jeremiah

Richard

it is from here:


diff --git a/src/keyresponses.c b/src/keyresponses.c


index d9c0823..71aee66 100644 (file)


--- a/src/keyresponses.c

+++ b/src/keyresponses.c

@@ -212,7 +212,7 @@ gchar *  process_key_event(GdkEventKey * event,
gchar* perform_command()) {

      GList *g;

      GString *continuations = g_string_new("");

      for(g=Denemo.continuations;g;g=g->next)

- g_string_append_printf(continuations, "%s%s", g->data, ", or ");

+       g_string_append_printf(continuations, "%s%s", ((GString *)
g->data)->str, ", or ");

      g_string_printf(prefix_store, "Prefix Key %s, waiting for key %
stype Esc to abort", name, continuations->str);

      g_string_free(continuations, TRUE);

      gtk_statusbar_pop(GTK_STATUSBAR (Denemo.statusbar),
Denemo.status_context_id);






_______________________________________________
Denemo-devel mailing list
address@hidden
http://lists.gnu.org/mailman/listinfo/denemo-devel



reply via email to

[Prev in Thread] Current Thread [Next in Thread]