diff -up denemo-0.8.6/include/denemo/denemo_types.h.orig denemo-0.8.6/include/denemo/denemo_types.h
--- denemo-0.8.6/include/denemo/denemo_types.h.orig	2009-08-02 19:01:12.000000000 +0200
+++ denemo-0.8.6/include/denemo/denemo_types.h	2009-08-03 00:04:16.000000000 +0200
@@ -332,9 +332,9 @@ typedef struct DenemoPrefs
   gboolean rtcs; /**< Real time csound */
   GString *sequencer;  /**< path to sequencer device */
   GString *midi_in;  /**< path to midi_in device */
-  gboolean *jacktransport; /**< toggle on and off jack transport */
-  gboolean *jacktransport_start_stopped; /**< toggle if you don't want transport to play immediately but rely on the transport controls */
-  gboolean *jack_at_startup; /**< toggle on and off jack initialization at startup */
+  gboolean jacktransport; /**< toggle on and off jack transport */
+  gboolean jacktransport_start_stopped; /**< toggle if you don't want transport to play immediately but rely on the transport controls */
+  gboolean jack_at_startup; /**< toggle on and off jack initialization at startup */
   GString *pdfviewer; /**< PDF viewer */
   GString *imageviewer; /**< Image Viewer */
   GString *texteditor; /**< texteditor for editing scripts and lilypond files */
diff -up denemo-0.8.6/src/audiocapture.c.orig denemo-0.8.6/src/audiocapture.c
--- denemo-0.8.6/src/audiocapture.c.orig	2009-08-02 19:01:12.000000000 +0200
+++ denemo-0.8.6/src/audiocapture.c	2009-08-03 00:04:16.000000000 +0200
@@ -190,7 +190,7 @@ void play_pitch (double pitch, double du
 		      1024,            /* frames per buffer */
 #endif
 		      paClipOff,       /* we won't output out of range samples so don't bother clipping them */
-		      playCallback,
+		      (PaStreamCallback *)playCallback,
 		      &out_data );
   if( err != paNoError ) {
     g_print("Error opening stream\n");
@@ -217,7 +217,7 @@ int init_audio_out(void)
 	err = Pa_Initialize();
 	if( err != paNoError ) {
 	  g_print("Error initializing portaudio library\n");
-	  return;
+	  return 0;
 	}
 	out_data.frameIndex = 0;
 	out_data.recordedSamples = (SAMPLE *) malloc( TABLE_SIZE*sizeof(SAMPLE) );
@@ -299,6 +299,7 @@ static int recordCallback(const	void *in
 
 int collect_data_for_tuning(int ok) {
   tuning = ok;
+  return 1;
 }
 
 /******************************************************************
@@ -380,7 +381,7 @@ int pa_main(AubioCallback *fn)
 				1024,            /* frames per buffer */
 #endif
 				paClipOff,  /* we won't output out of range samples so don't bother clipping them */
-				recordCallback,
+				(PaStreamCallback *)recordCallback,
 				NULL );
 	if( err != paNoError ) goto error;
 
diff -up denemo-0.8.6/src/chordops.c.orig denemo-0.8.6/src/chordops.c
--- denemo-0.8.6/src/chordops.c.orig	2009-08-02 19:01:12.000000000 +0200
+++ denemo-0.8.6/src/chordops.c	2009-08-03 00:04:16.000000000 +0200
@@ -58,6 +58,7 @@ findreversealigns (DenemoObject * thecho
 
   ((chord *) thechord->object)->is_reversealigned = FALSE;
   if (((chord *) thechord->object)->notes)
+    {
     if (((chord *) thechord->object)->is_stemup)
       {
 	/* note clusters are painted left-right from bottom to top */
@@ -103,6 +104,7 @@ findreversealigns (DenemoObject * thecho
 	      curnote->reversealign = FALSE;
 	  }			/* End for */
       }				/* End else */
+  }
   setpixelmin (thechord);
 }
 
@@ -157,8 +159,9 @@ newchord (gint baseduration, gint numdot
   return thechord;
 }
 DenemoObject *
-dnm_newchord (gint baseduration, gint numdots, int tied){
-		newchord (baseduration, numdots, tied);
+dnm_newchord (gint baseduration, gint numdots, int tied)
+{
+  return newchord (baseduration, numdots, tied);
 }
 /**
  * Set the invisible flag for the DenemoObject
@@ -183,8 +186,8 @@ void
 addornament (DenemoObject * obj, Ornament orn)
 {
   if (obj && obj->type == CHORD && ((chord *) obj->object)->notes)
-    ((chord *) obj->object)->ornamentlist =
-      insert_ornament_list (orn, ((chord *) obj->object)->ornamentlist);
+    ((chord *) obj->object)->ornamentlist = 
+      (GList *) insert_ornament_list (orn, ((chord *) obj->object)->ornamentlist);
 }
 
 /**
@@ -350,6 +353,7 @@ removetone (DenemoObject * thechord, gin
     {
       tone = (note *) tnode->data;
       if (!tnode->next)		/* That is, we're removing the highest pitch */
+	{
 	if (tnode->prev)
 	  {
 	    ((chord *) thechord->object)->highestpitch =
@@ -364,8 +368,10 @@ removetone (DenemoObject * thechord, gin
 	    /* Had to take care of this somewhere - perhaps not needed - when passing through an edit with no notes...
 	    ((chord *) thechord->object)->is_tied = FALSE; */
 	  }
+	}
       if (!tnode->prev)		/* That is, we're removing the lowest pitch */
-	if (tnode->next)
+	{
+	  if (tnode->next)
 	  {
 	    ((chord *) thechord->object)->lowestpitch =
 	      ((note *) tnode->next->data)->mid_c_offset;
@@ -375,6 +381,7 @@ removetone (DenemoObject * thechord, gin
 	  }
 	else
 	  ((chord *) thechord->object)->lowestpitch = G_MAXINT;
+	}
       ((chord *) thechord->object)->sum_mid_c_offset -= tone->mid_c_offset;
 
       /* Now that we no longer need any info in tnode or tone, 
@@ -464,9 +471,9 @@ changenumdots (DenemoObject * thechord,
 
 
 static void 
-freenote(note *thenote) {
-  if(thenote->directives) {
-    free_directives(thenote->directives);
+freenote(gpointer thenote) {
+  if(((note *)thenote)->directives) {
+    free_directives(((note *)thenote)->directives);
     //g_list_free(thenote->directives);
   }
   g_free(thenote);
@@ -479,7 +486,7 @@ freenote(note *thenote) {
 void
 freechord (DenemoObject * thechord)
 {
-  g_list_foreach (((chord *) thechord->object)->notes, freenote, NULL);
+  g_list_foreach (((chord *) thechord->object)->notes, (GFunc)freenote, NULL);
   g_list_free (((chord *) thechord->object)->notes);
   g_list_free(((chord *) thechord->object)->dynamics);
   g_list_free(((chord *) thechord->object)->ornamentlist);
diff -up denemo-0.8.6/src/chordops.h.orig denemo-0.8.6/src/chordops.h
--- denemo-0.8.6/src/chordops.h.orig	2009-08-02 19:01:12.000000000 +0200
+++ denemo-0.8.6/src/chordops.h	2009-08-03 00:04:16.000000000 +0200
@@ -25,6 +25,8 @@ void modify_note (chord *thechord,  gint
 note* addtone (DenemoObject * mudelaobj, gint mid_c_offset, gint enshift,
 	      gint dclef);
 
+void addornament (DenemoObject * obj, Ornament orn);
+
 gboolean removetone (DenemoObject * mudelaobj, gint mid_c_offset, gint dclef);
 
 void shiftpitch (DenemoObject * mudelaobj, gint mid_c_offset,
diff -up denemo-0.8.6/src/commandfuncs.c.orig denemo-0.8.6/src/commandfuncs.c
--- denemo-0.8.6/src/commandfuncs.c.orig	2009-08-02 19:01:12.000000000 +0200
+++ denemo-0.8.6/src/commandfuncs.c	2009-08-03 10:31:19.000000000 +0200
@@ -340,7 +340,7 @@ swapmovements (GtkAction *action, gpoint
 {
   DenemoGUI  *gui = Denemo.gui;
   if(!confirm_insertstaff_custom_scoreblock(gui))
-    return;
+    return TRUE;
   GList *this = g_list_find( gui->movements, gui->si);
   if(this->prev) {
     GList * prev = this->prev;
@@ -361,6 +361,7 @@ swapmovements (GtkAction *action, gpoint
     g_free(str);
   } else
     warningdialog("There is no previous movement to swap with");
+  return FALSE;
 }
 /**
  * 
@@ -371,7 +372,7 @@ swapstaffs (GtkAction *action, gpointer
 {
   DenemoGUI  *gui = Denemo.gui;
   if(!confirm_insertstaff_custom_scoreblock(gui))
-    return;
+    return FALSE;
   if (gui->si->currentstaff && gui->si->currentstaff->prev)
     {
       DenemoStaff *temp;
@@ -404,7 +405,7 @@ splitstaffs (GtkAction *action, gpointer
 {
   DenemoGUI  *gui = Denemo.gui;
   if(!confirm_insertstaff_custom_scoreblock(gui))
-    return;
+    return FALSE;
   if (gui->si->currentstaff && gui->si->currentstaff->next)
     {
       DenemoStaff *thestaff = (DenemoStaff *)gui->si->currentstaff->data;
@@ -435,7 +436,7 @@ joinstaffs (GtkAction *action, gpointer
 {
   DenemoGUI  *gui = Denemo.gui;
   if(!confirm_insertstaff_custom_scoreblock(gui))
-    return;
+    return FALSE;
   if (gui->si->currentstaff && gui->si->currentstaff->prev)
     {
       DenemoStaff *thestaff = (DenemoStaff *)gui->si->currentstaff->data;
@@ -1056,6 +1057,7 @@ notechange (DenemoScore * si, gboolean r
 gboolean
 delete_chordnote (DenemoScore * si){
   notechange(si, TRUE);
+  return TRUE;
 }
 /**
  * Insert chord note at y cursor position 
@@ -1063,6 +1065,7 @@ delete_chordnote (DenemoScore * si){
 gboolean
 insert_chordnote (DenemoScore *si){
   notechange(si, FALSE);
+  return TRUE;
 }
 
 /**
diff -up denemo-0.8.6/src/csoundplayback.c.orig denemo-0.8.6/src/csoundplayback.c
--- denemo-0.8.6/src/csoundplayback.c.orig	2009-08-02 19:01:12.000000000 +0200
+++ denemo-0.8.6/src/csoundplayback.c	2009-08-03 00:04:16.000000000 +0200
@@ -54,7 +54,7 @@ csoundplayback (GtkAction *action, gpoin
   FILE *fp;
   int got = 0;
 
-  pidpath = g_string_new (get_temp_filename (ext_pidfiles[EXT_CSOUND]));
+  pidpath = g_string_new ((const gchar *)get_temp_filename (ext_pidfiles[EXT_CSOUND]));
   fp = fopen (pidpath->str, "rb+");
 #ifdef HAVE_FILE_LOCKS
   if (ftrylockfile (fp))	/* FIXME: is it multiprocs? */
@@ -81,13 +81,13 @@ csoundplayback (GtkAction *action, gpoin
       /* sleep(1); wait /dev/dsp do be *really* closed */
     }
 
-  filename = g_string_new (get_temp_filename ("denemocsoundplayback.sco"));
+  filename = g_string_new ((const gchar *)get_temp_filename ("denemocsoundplayback.sco"));
   exportcsound (filename->str, gui->si, gui->si->start, gui->si->end);
   extplayer = Denemo.prefs.rtcs;
   if (!extplayer)
     outputfile = g_string_new ("devaudio ");
   else
-    outputfile = g_string_new (get_temp_filename ("denemocsoundplayback.wav"));
+    outputfile = g_string_new ((const gchar *)get_temp_filename ("denemocsoundplayback.wav"));
   csoundline = g_string_new (Denemo.prefs.csoundcommand->str);
   g_string_append (csoundline, " -o ");
   g_string_append (csoundline, outputfile->str);
diff -up denemo-0.8.6/src/draw.c.orig denemo-0.8.6/src/draw.c
--- denemo-0.8.6/src/draw.c.orig	2009-08-02 19:01:12.000000000 +0200
+++ denemo-0.8.6/src/draw.c	2009-08-03 00:04:16.000000000 +0200
@@ -253,7 +253,7 @@ draw_object (objnode * curobj, gint x, g
 
        if (si->currentstaffnum==itp->staffnum && itp->verse && thechord->notes   && !itp->slur_stack )
 	{
-	  gchar *syllable = next_syllable();
+	  gchar *syllable = (gchar *) next_syllable();
 	  if(syllable)
 	    draw_lyric (gui->pixmap, itp->gc,
 			gtk_style_get_font (itp->widget->style),
diff -up denemo-0.8.6/src/dynamic.c.orig denemo-0.8.6/src/dynamic.c
--- denemo-0.8.6/src/dynamic.c.orig	2009-08-02 19:01:12.000000000 +0200
+++ denemo-0.8.6/src/dynamic.c	2009-08-03 00:04:16.000000000 +0200
@@ -77,7 +77,7 @@ insert_dynamic (GtkAction *action, gpoin
   GList *directivelist = NULL;
 
 
-  dialog = dialog = gtk_dialog_new_with_buttons (_("Insert Dynamic"), NULL,	/* parent window */
+  dialog = gtk_dialog_new_with_buttons (_("Insert Dynamic"), NULL,	/* parent window */
 						 (GtkDialogFlags)
 						 (GTK_DIALOG_MODAL |
 						  GTK_DIALOG_DESTROY_WITH_PARENT),
diff -up denemo-0.8.6/src/exportlilypond.c.orig denemo-0.8.6/src/exportlilypond.c
--- denemo-0.8.6/src/exportlilypond.c.orig	2009-08-02 19:01:12.000000000 +0200
+++ denemo-0.8.6/src/exportlilypond.c	2009-08-03 00:04:16.000000000 +0200
@@ -1786,7 +1786,7 @@ void delete_lily_cb (GtkAction *action,
 
   gtk_text_buffer_delete(gui->textbuffer, &start, &end);
 }
-static gboolean print_lily_cb (GtkWidget *item, DenemoGUI *gui){
+static void print_lily_cb (GtkWidget *item, DenemoGUI *gui){
   gchar *filename = get_printfile_pathbasename();
   gchar *lilyfile = g_strconcat (filename, ".ly", NULL);
   FILE *fp = fopen(lilyfile, "w");
diff -up denemo-0.8.6/src/importmidi.c.orig denemo-0.8.6/src/importmidi.c
--- denemo-0.8.6/src/importmidi.c.orig	2009-08-02 19:01:12.000000000 +0200
+++ denemo-0.8.6/src/importmidi.c	2009-08-03 00:04:16.000000000 +0200
@@ -335,7 +335,7 @@ decode_midi_event(const smf_event_t *eve
 					channel, note, event->midi_buffer[2]);
 			mididata->delta_time = event->delta_time_pulses;
 			mididata->event_number = event->event_number;
-			donoteon(mididata,  event->midi_buffer[1],  event->midi_buffer[2], 
+			donoteon(mididata,  (gint *)event->midi_buffer[1],  (gint *)event->midi_buffer[2], (gint *)
 					event->time_pulses);
 			break;
 
@@ -549,7 +549,7 @@ ChordToneCheck(midicallback *mididata, g
 	  currentnote->chordnotes = g_list_append(currentnote->chordnotes, pitch);
 	  return TRUE;
   }
-  else if (currentnote->timeon <= timeon <= ((int) currentnote->timeon + (int) currentnote->duration)){
+  else if ((currentnote->timeon <= timeon) && (timeon <= ((int) currentnote->timeon + (int) currentnote->duration))){
 	  voicenum++;
 	g_print("\n***NOTE_ON colliding between a NOTE_ON and NOTE_OFF tracknum = %d voicenum = %d***\n",tracknum, voicenum);	
   	/* append to voice glist */
diff -up denemo-0.8.6/src/importxml.c.orig denemo-0.8.6/src/importxml.c
--- denemo-0.8.6/src/importxml.c.orig	2009-08-02 19:01:12.000000000 +0200
+++ denemo-0.8.6/src/importxml.c	2009-08-03 10:36:45.000000000 +0200
@@ -236,7 +236,7 @@ LOOKUP(GROUP_END_STRING,DENEMO_GROUP_END
 #define DO_INTDIREC(field) if (ELEM_NAME_EQ (childElem, #field))\
          directive->field = getXMLIntChild(childElem);
 
-static gint
+static void
 parseDirective (xmlNodePtr parentElem, xmlNsPtr ns,
 	       DenemoDirective *directive)
 {
@@ -289,6 +289,7 @@ parseWidgetDirective (xmlNodePtr parentE
     DO_INTDIREC(gy);
   }
   widget_for_directive(directive,fn);
+  return TRUE;
 }
 
 
@@ -301,9 +302,9 @@ parseVerse (xmlNodePtr parentElem, xmlNs
 {
   gchar*   text = xmlNodeListGetString (parentElem->doc, parentElem->xmlChildrenNode, 1);
 
-  gtk_text_buffer_set_text (gtk_text_view_get_buffer (verse), text, -1);
+  gtk_text_buffer_set_text (gtk_text_view_get_buffer ((GtkTextView *) verse), text, -1);
   //gtk_text_buffer_set_modified(gtk_text_view_get_buffer(verse), FALSE);
-  g_signal_connect (G_OBJECT (gtk_text_view_get_buffer (verse)), "changed", G_CALLBACK (lyric_change), NULL);
+  g_signal_connect (G_OBJECT (gtk_text_view_get_buffer ((GtkTextView *)verse)), "changed", G_CALLBACK (lyric_change), NULL);
   g_free (text);
 }
 
diff -up denemo-0.8.6/src/jackmidi.c.orig denemo-0.8.6/src/jackmidi.c
--- denemo-0.8.6/src/jackmidi.c.orig	2009-08-02 19:01:12.000000000 +0200
+++ denemo-0.8.6/src/jackmidi.c	2009-08-03 00:04:16.000000000 +0200
@@ -174,6 +174,7 @@ timeout_id= 0;
 if(kill_id)
   g_source_remove(kill_id);
 kill_id = 0;
+return 1;
 }
 
 static void
@@ -185,6 +186,7 @@ process_midi_output(jack_nframes_t nfram
 	jack_nframes_t	last_frame_time;
 	jack_transport_state_t transport_state;
 	static jack_transport_state_t previous_transport_state = JackTransportStopped;
+	smf_event_t *n;
 	for (i = 0; i < smf->number_of_tracks; i++) {
 	  if(output_ports[i])
 	     port_buffers[i] = jack_port_get_buffer(output_ports[i], nframes);
@@ -251,7 +253,7 @@ process_midi_output(jack_nframes_t nfram
 			if (decoded && !be_quiet)
 				warn_from_jack_thread_context/*g_debug*/(g_strdup_printf("Metadata: %s", decoded));
 
-			smf_get_next_event(smf);
+			n = smf_get_next_event(smf);
 			continue;
 		}
 
@@ -275,7 +277,7 @@ process_midi_output(jack_nframes_t nfram
 		assert(event->track->track_number >= 0 && event->track->track_number <= MAX_NUMBER_OF_TRACKS);
 
 		/* We will send this event; remove it from the queue. */
-		smf_get_next_event(smf);
+		n = smf_get_next_event(smf);
 
 		/* First, send it via midi_out. */
 		track_number = 0;
@@ -379,7 +381,7 @@ sync_callback(jack_transport_state_t sta
 
 	if (state == JackTransportStarting) {
 		song_position = position->frame;
-		smf_seek_to_seconds(smf, nframes_to_seconds(position->frame));
+		int n = smf_seek_to_seconds(smf, nframes_to_seconds(position->frame));
 
 		if (!be_quiet)
 			g_debug("Seeking to %f seconds.", nframes_to_seconds(position->frame));
@@ -422,6 +424,7 @@ create_jack_midi_port(char* port_name){
 		return i;
 	  }
 	}
+    return 0;
   }
   else 
     return -1;
@@ -474,7 +477,7 @@ remove_all_jack_midi_ports(){
 #endif
 	  }
 	}
-	return err;
+	/*return err;*/
 }
 
 int
@@ -577,9 +580,9 @@ jack_midi_playback_start()
   DenemoGUI *gui = Denemo.gui;
   playback_started = -1, song_position = 0, stop_midi_output = 0;
   /* set tranport on/off */
-  use_transport = Denemo.prefs.jacktransport; 
+  use_transport = (int)Denemo.prefs.jacktransport; 
   /* set tranport start_stopped */
-  start_stopped = Denemo.prefs.jacktransport_start_stopped; 
+  start_stopped = (int)Denemo.prefs.jacktransport_start_stopped; 
   g_debug("\nTransport set to %d Transport start stopped = %d\n", 
 		  use_transport, start_stopped);
   if (jack_client != NULL){
@@ -628,7 +631,7 @@ jack_midi_playback_start()
 	  }
 	  duration = end_time - start_time;
 	  g_print("start %f for %f seconds\n",start_time, duration);
-	  smf_seek_to_seconds(smf, start_time);
+	  int n = smf_seek_to_seconds(smf, start_time);
 	  /* execute jackmidi player function */ 
 	  jack_midi_player();
 
diff -up denemo-0.8.6/src/kbd-custom.c.orig denemo-0.8.6/src/kbd-custom.c
--- denemo-0.8.6/src/kbd-custom.c.orig	2009-08-02 19:01:12.000000000 +0200
+++ denemo-0.8.6/src/kbd-custom.c	2009-08-03 00:04:16.000000000 +0200
@@ -594,9 +594,9 @@ register_command(keymap *the_keymap, Gtk
 {
     guint i;
     guint *value;
-    GtkTreeIter iter;
+    GtkTreeIter iter ={0,NULL,NULL,NULL};
     GtkListStore *bindings;
-    KeymapCommandType type;//We may need to use this to distinguish scheme scripts from built ins.
+    KeymapCommandType type = 0;//We may need to use this to distinguish scheme scripts from built ins.
         //get the index of the new row
         value = (guint *) g_malloc(sizeof(guint));
         *value = gtk_tree_model_iter_n_children(
@@ -920,7 +920,7 @@ gboolean lookup_hidden_from_idx (keymap
   gboolean res = FALSE;
   command_row row;
   if (!keymap_get_command_row(keymap, &row, command_idx))
-      return NULL;
+      return 0;
   res = row.hidden;//FIXME label is a property g_object_get_prop...
   g_object_unref(row.bindings);
   return res;
@@ -932,7 +932,7 @@ gboolean lookup_deleted_from_idx (keymap
   gboolean res = FALSE;
   command_row row;
   if (!keymap_get_command_row(keymap, &row, command_idx))
-      return NULL;
+      return 0;
   res = row.deleted;//FIXME label is a property g_object_get_prop...
   g_object_unref(row.bindings);
   return res;
@@ -1128,7 +1128,7 @@ add_keybinding_to_named_command(keymap *
   guint command_idx;
   value = g_hash_table_lookup(the_keymap->idx_from_name, command_name);
   if (!value) {
-      g_warning("add_keybinding: %s, command does not exist");
+      g_warning("add_keybinding: %s, command does not exist", command_name);
       return -1;
   }
   command_idx = *(guint *) value;
@@ -1275,7 +1275,7 @@ idx_has_callback(keymap *the_keymap, gui
   if (!keymap_get_command_row(the_keymap, &row, command_idx))
       return FALSE;
   g_object_unref(row.bindings);
-  res = row.callback;
+  res = (gboolean)row.callback;
   return res;
 }
 
@@ -1297,7 +1297,7 @@ gboolean
 execute_callback_from_name(keymap *the_keymap, const gchar* command_name)
 {
   gboolean res = TRUE;
-  GtkAction *action = action_of_name(the_keymap, command_name);
+  GtkAction *action = action_of_name(the_keymap, (gchar *)command_name);
   gtk_action_activate(action);
   return res;
 }
@@ -1662,7 +1662,7 @@ command_hidden_data_function (GtkTreeVie
             COL_TYPE, &type,
             COL_ACTION, &action,
             -1);
-    hidden = g_object_get_data(G_OBJECT(action), "hidden");   
+    hidden = (gboolean)g_object_get_data(G_OBJECT(action), "hidden");   
     g_object_set(renderer, "active", hidden, NULL);
 }
 
@@ -1680,7 +1680,7 @@ command_deleted_data_function (GtkTreeVi
             COL_TYPE, &type,
             COL_ACTION, &action,
             -1);
-    deleted = g_object_get_data(G_OBJECT(action), "deleted");   
+    deleted = (gboolean)g_object_get_data(G_OBJECT(action), "deleted");   
     g_object_set(renderer, "active", deleted, NULL);
 }
 
@@ -1709,9 +1709,9 @@ search_equal_func(GtkTreeModel *model, g
 static void toggle_hidden_on_action (GtkCellRendererToggle *cell_renderer,
                                             gchar *path)  {
   gint command_idx = atoi(path);
-  GtkAction *action = lookup_action_from_idx (Denemo.map, command_idx);
+  GtkAction *action = (GtkAction *)lookup_action_from_idx (Denemo.map, command_idx);
   if(GTK_IS_ACTION(action)){
-    gboolean hidden = (gboolean)g_object_get_data(action, "hidden");
+    gboolean hidden = (gboolean)g_object_get_data(G_OBJECT(action), "hidden");
     set_visibility_for_action(action, hidden);
   }
 }
@@ -1720,11 +1720,11 @@ static void toggle_hidden_on_action (Gtk
 static void toggle_deleted_on_action (GtkCellRendererToggle *cell_renderer,
                                             gchar *path)  {
   gint command_idx = atoi(path);
-  GtkAction *action = lookup_action_from_idx (Denemo.map, command_idx);
+  GtkAction *action = (GtkAction *)lookup_action_from_idx (Denemo.map, command_idx);
   if(GTK_IS_ACTION(action)){
-    gboolean deleted = (gboolean)g_object_get_data(action, "deleted");
+    gboolean deleted = (gboolean)g_object_get_data(G_OBJECT(action), "deleted");
     //set_visibility_for_action(action, deleted);
-    g_object_set_data(action, "deleted", !deleted);
+    g_object_set_data(G_OBJECT(action), "deleted", (gboolean *)!deleted);
   }
 }
 
@@ -1762,7 +1762,7 @@ keymap_get_command_view(keymap *the_keym
   gtk_tree_view_column_add_attribute(col, renderer, "active", COL_HIDDEN);
   gtk_tree_view_column_set_cell_data_func(col, renderer,
 					  command_hidden_data_function, NULL, NULL);
-  g_signal_connect(renderer, "toggled", toggle_hidden_on_action, NULL);
+  g_signal_connect(renderer, "toggled", (GCallback)toggle_hidden_on_action, NULL);
 
 
   col = gtk_tree_view_column_new();
@@ -1774,7 +1774,7 @@ keymap_get_command_view(keymap *the_keym
   gtk_tree_view_column_add_attribute(col, renderer, "active", COL_DELETED);
   gtk_tree_view_column_set_cell_data_func(col, renderer,
 					  command_deleted_data_function, NULL, NULL);
-  g_signal_connect(renderer, "toggled", toggle_deleted_on_action, NULL);
+  g_signal_connect(renderer, "toggled", (GCallback)toggle_deleted_on_action, NULL);
 
 
 
diff -up denemo-0.8.6/src/kbd-interface.c.orig denemo-0.8.6/src/kbd-interface.c
--- denemo-0.8.6/src/kbd-interface.c.orig	2009-08-02 19:01:12.000000000 +0200
+++ denemo-0.8.6/src/kbd-interface.c	2009-08-03 10:39:44.000000000 +0200
@@ -181,7 +181,7 @@ static void keyboard_modifier_callback(G
 g_string_append(str, "\n");
   g_string_append(str, POINTER_PROMPT);
   
-  gtk_button_set_label (w,str->str);
+  gtk_button_set_label ((GtkButton *)w,str->str);
   assign_cursor(state, cursor_number);
   g_string_free(str, TRUE);
 }
@@ -198,18 +198,18 @@ set_cursor_number (GtkSpinButton *widget
   //gdk_window_set_cursor(widget->window, cursor);   
 }
 static void button_choice_callback(GtkWidget *w, gint *mask ){
-  gint choice =  gtk_toggle_button_get_active(w);
+  gint choice =  gtk_toggle_button_get_active((GtkToggleButton *)w);
   if(choice)
-    *mask = g_object_get_data(w, "mask");
+    *mask = (gint)g_object_get_data((GObject *)w, "mask");
   g_print("button choice %x\n", *mask);
 }
 #define RESPONSE_LOADED (1)
-static load_system_keymap_dialog_response(GtkButton *button, GtkWidget *dialog) {
+static void load_system_keymap_dialog_response(GtkButton *button, GtkWidget *dialog) {
   load_system_keymap_dialog(button);
   gtk_dialog_response(dialog, RESPONSE_LOADED);
 }
 
-static load_keymap_dialog_response(GtkButton *button, GtkWidget *dialog) {
+static void load_keymap_dialog_response(GtkButton *button, GtkWidget *dialog) {
   load_keymap_dialog(button);
   gtk_dialog_response(dialog, RESPONSE_LOADED);
 }
@@ -276,7 +276,7 @@ configure_keyboard_dialog_init_idx (GtkA
 
   
   frame= gtk_frame_new( "Help for Selected Command");
-  gtk_frame_set_shadow_type(frame, GTK_SHADOW_IN);
+  gtk_frame_set_shadow_type((GtkFrame *)frame, GTK_SHADOW_IN);
   gtk_container_add (GTK_CONTAINER (vbox), frame);
   text_view = gtk_text_view_new();
   gtk_text_view_set_editable(GTK_TEXT_VIEW(text_view), FALSE);
@@ -372,12 +372,12 @@ configure_keyboard_dialog_init_idx (GtkA
   } else {
     gtk_tree_model_iter_nth_child(model, &iter, NULL, command_idx);
     path = gtk_tree_model_get_path(model, &iter);
-    gtk_tree_view_scroll_to_cell(command_tree_view, path, NULL, FALSE, 0, 0);
+    gtk_tree_view_scroll_to_cell((GtkTreeView *)command_tree_view, path, NULL, FALSE, 0, 0);
     gtk_tree_path_free(path);
   }
   gtk_tree_selection_select_iter(selection, &iter);
   frame= gtk_frame_new( "Setting the mouse pointer");
-  gtk_frame_set_shadow_type(frame, GTK_SHADOW_IN);
+  gtk_frame_set_shadow_type((GtkFrame *)frame, GTK_SHADOW_IN);
   gtk_container_add (GTK_CONTAINER (vbox), frame);
   GtkWidget *hbox = gtk_hbox_new (FALSE, 8);
   gtk_container_add (GTK_CONTAINER (frame), hbox);
@@ -394,23 +394,23 @@ configure_keyboard_dialog_init_idx (GtkA
 
   GtkWidget *mouse_state = gtk_radio_button_new_with_label(NULL, "Right Drag");
   gtk_box_pack_start (GTK_BOX (vbox), mouse_state, TRUE, TRUE, 0);
-  g_object_set_data(mouse_state, "mask", GDK_BUTTON3_MASK);
-  g_signal_connect(mouse_state, "toggled", button_choice_callback, &info.button_mask);
-  GtkWidget *mouse_state2 = gtk_radio_button_new_with_label_from_widget(mouse_state, "Mouse Move");
-  g_signal_connect(mouse_state2, "toggled", button_choice_callback, &info.button_mask);
-  g_object_set_data(mouse_state2, "mask", 0);
+  g_object_set_data((GObject *)mouse_state, "mask", (gpointer)GDK_BUTTON3_MASK);
+  g_signal_connect(mouse_state, "toggled", (GCallback)button_choice_callback, &info.button_mask);
+  GtkWidget *mouse_state2 = gtk_radio_button_new_with_label_from_widget((GtkRadioButton *)mouse_state, "Mouse Move");
+  g_signal_connect(mouse_state2, "toggled", (GCallback)button_choice_callback, &info.button_mask);
+  g_object_set_data((GObject *)mouse_state2, "mask", 0);
   gtk_box_pack_start (GTK_BOX (vbox), mouse_state2, TRUE, TRUE, 0);
-  mouse_state2 = gtk_radio_button_new_with_label_from_widget(mouse_state, "Left Drag");
-  g_signal_connect(mouse_state2, "toggled", button_choice_callback, &info.button_mask);
-  g_object_set_data(mouse_state2, "mask", GDK_BUTTON1_MASK);
+  mouse_state2 = gtk_radio_button_new_with_label_from_widget((GtkRadioButton *)mouse_state, "Left Drag");
+  g_signal_connect(mouse_state2, "toggled", (GCallback)button_choice_callback, &info.button_mask);
+  g_object_set_data((GObject *)mouse_state2, "mask", (gpointer)GDK_BUTTON1_MASK);
   gtk_box_pack_start (GTK_BOX (vbox), mouse_state2, TRUE, TRUE, 0);
 
   label = gtk_label_new("Mouse Pointer Number");
   gtk_box_pack_start (GTK_BOX (hbox), label, TRUE, TRUE, 0);
   GtkWidget *spinner_adj =
-    (GtkAdjustment *) gtk_adjustment_new ( info.cursor_number, 0.0,(gdouble)GDK_LAST_CURSOR-1,
+    (GtkWidget *) gtk_adjustment_new ( info.cursor_number, 0.0,(gdouble)GDK_LAST_CURSOR-1,
 					   1.0, 1.0, 1.0);
-  GtkWidget *spinner = gtk_spin_button_new (spinner_adj, 1.0, 0);
+  GtkWidget *spinner = gtk_spin_button_new ((GtkAdjustment *)spinner_adj, 1.0, 0);
   gtk_box_pack_start (GTK_BOX (hbox), spinner, TRUE, TRUE, 0);
   g_signal_connect (G_OBJECT (spinner), "value-changed",
 		    G_CALLBACK (set_cursor_number), &info.cursor_number);
diff -up denemo-0.8.6/src/keyboard.c.orig denemo-0.8.6/src/keyboard.c
--- denemo-0.8.6/src/keyboard.c.orig	2009-08-02 19:01:12.000000000 +0200
+++ denemo-0.8.6/src/keyboard.c	2009-08-03 00:04:16.000000000 +0200
@@ -105,7 +105,7 @@ get_state (gchar * key)
 }
 
 /* add ui elements for menupath if missing */
-static gint
+static void
 instantiate_menus(gchar *menupath) {
   //g_print("Instantiate menus for %s\n", menupath);
  
@@ -606,7 +606,7 @@ save_xml_keymap (gchar * filename)
 
   child = xmlNewChild (parent, NULL, (xmlChar *) "cursors", NULL);
 
-  g_hash_table_foreach(Denemo.map->cursors, output_pointer_shortcut, child);
+  g_hash_table_foreach(Denemo.map->cursors, (GHFunc)output_pointer_shortcut, child);
 
 
   for (i = 0; i < keymap_size(the_keymap); i++)
diff -up denemo-0.8.6/src/lash_support.c.orig denemo-0.8.6/src/lash_support.c
--- denemo-0.8.6/src/lash_support.c.orig	2009-08-02 19:01:12.000000000 +0200
+++ denemo-0.8.6/src/lash_support.c	2009-08-03 00:04:16.000000000 +0200
@@ -32,7 +32,7 @@ restore_data(lash_config_t * config)
 
 	if (strcmp(key, "filename") == 0) {
 		g_print("\n*** Lash Open filename = %s ***\n",lash_config_get_value_string(config));
-		open_for_real (lash_config_get_value_string(config), 
+		open_for_real ((gchar *)lash_config_get_value_string(config), 
 				gui, FALSE, REPLACE_SCORE);
 		return;
 	}
diff -up denemo-0.8.6/src/lilydirectives.c.orig denemo-0.8.6/src/lilydirectives.c
--- denemo-0.8.6/src/lilydirectives.c.orig	2009-08-02 19:01:12.000000000 +0200
+++ denemo-0.8.6/src/lilydirectives.c	2009-08-03 00:04:16.000000000 +0200
@@ -697,10 +697,10 @@ DenemoDirective *get_voice_directive(gch
 gboolean
 delete_staff_directive(gchar *tag) {
   if(Denemo.gui->si->currentstaff==NULL)
-    return;
+    return FALSE;
   DenemoStaff *curstaff = Denemo.gui->si->currentstaff->data;
   if(curstaff==NULL || curstaff->staff_directives==NULL)
-    return;
+    return FALSE;
   return delete_directive(&curstaff->staff_directives, tag);
 }
 
@@ -708,10 +708,10 @@ delete_staff_directive(gchar *tag) {
 gboolean
 delete_initialclef_directive(gchar *tag) {
   if(Denemo.gui->si->currentstaff==NULL)
-    return;
+    return FALSE;
   DenemoStaff *curstaff = Denemo.gui->si->currentstaff->data;
   if(curstaff==NULL || curstaff->clef.directives==NULL)
-    return;
+    return FALSE;
   return delete_directive(&curstaff->clef.directives, tag);
 }
 
diff -up denemo-0.8.6/src/lyparser.y.orig denemo-0.8.6/src/lyparser.y
--- denemo-0.8.6/src/lyparser.y.orig	2009-08-02 19:01:12.000000000 +0200
+++ denemo-0.8.6/src/lyparser.y	2009-08-03 16:35:50.000000000 +0200
@@ -872,7 +872,7 @@ Simple_music:
 		$$ = g_list_append(NULL,mud);
 	}
 	| LILYDIRECTIVE_TOKEN STRING_ {
-		DenemoObject *mud = lily_directive_new (g_strconcat($1.user_string, $2.user_string));	
+		DenemoObject *mud = lily_directive_new (g_strconcat($1.user_string, $2.user_string, NULL));	
 		$$ = g_list_append(NULL,mud);
 	}
 	| OUTPUTPROPERTY embedded_scm embedded_scm '=' embedded_scm	{
@@ -2178,7 +2178,7 @@ simple_element:
 		stradd((*mud),$2);
 		$$ = g_list_append(NULL,mud);
                 }	else {
-		DenemoObject *mud = lily_directive_new (g_strconcat($1.user_string, $2.user_string));	
+		DenemoObject *mud = lily_directive_new (g_strconcat($1.user_string, $2.user_string, NULL));	
 		$$ = g_list_append(NULL,mud);
                 }
 	}
diff -up denemo-0.8.6/src/lyric.c.orig denemo-0.8.6/src/lyric.c
--- denemo-0.8.6/src/lyric.c.orig	2009-08-02 19:01:12.000000000 +0200
+++ denemo-0.8.6/src/lyric.c	2009-08-03 00:04:16.000000000 +0200
@@ -5,6 +5,7 @@
  * for Denemo, a gtk+ frontend for GNU Lilypond
  * (c)2009 Richard Shann
  */
+#include <string.h> /* for strcmp() */
 #include "lyric.h"
 #include "objops.h"
 #include "staffops.h"
@@ -117,7 +118,7 @@ gchar *get_text_from_view(GtkWidget *tex
 
 gboolean scan_syllable(gchar **next, GString *gs) {
   gboolean result;
-  result = pango_scan_string(next, gs);
+  result = pango_scan_string((const char **)next, gs);
   if(result && !strcmp(gs->str, "--"))
      return scan_syllable(next, gs);
   return result;
@@ -131,7 +132,7 @@ static gchar *lyric_iterator(GtkWidget *
   if(gs==NULL)
     gs = g_string_new("");
   if(textview==NULL) {
-    gboolean result = scan_syllable(&next, gs);
+    gboolean result = scan_syllable((gchar **)&next, gs);
     if(result && gs->len)
       return gs->str;
     else
@@ -143,7 +144,7 @@ static gchar *lyric_iterator(GtkWidget *
     next = lyrics;
     start_count = count;
     while(count--)
-      scan_syllable(&next, gs);
+      scan_syllable((gchar **)&next, gs);
  }
   return NULL;
 }
diff -up denemo-0.8.6/src/measureops.c.orig denemo-0.8.6/src/measureops.c
--- denemo-0.8.6/src/measureops.c.orig	2009-08-02 19:01:12.000000000 +0200
+++ denemo-0.8.6/src/measureops.c	2009-08-03 00:04:16.000000000 +0200
@@ -88,7 +88,7 @@ addmeasures (DenemoScore * si, gint pos,
 measurenode *
 dnm_addmeasures (DenemoScore * si, gint pos, guint nummeasures, gint all)
 {
-	addmeasures (si,pos,nummeasures,all);
+  return addmeasures (si,pos,nummeasures,all);
 }
 /**
  * g_list_foreach function called by freeobjlist
diff -up denemo-0.8.6/src/midi.c.orig denemo-0.8.6/src/midi.c
--- denemo-0.8.6/src/midi.c.orig	2009-08-02 19:01:12.000000000 +0200
+++ denemo-0.8.6/src/midi.c	2009-08-03 00:04:16.000000000 +0200
@@ -388,4 +388,5 @@ gint stop_midi_input(void) {
   else
     channel = NULL;
 #endif
+  return 0;
 }
diff -up denemo-0.8.6/src/mousing.c.orig denemo-0.8.6/src/mousing.c
--- denemo-0.8.6/src/mousing.c.orig	2009-08-02 19:01:12.000000000 +0200
+++ denemo-0.8.6/src/mousing.c	2009-08-03 00:04:16.000000000 +0200
@@ -315,11 +315,12 @@ static gboolean selecting = FALSE;
 
 static change_staff(DenemoScore *si, gint num, GList *staff) {
   if(si->currentstaffnum==num)
-    return;
+    return FALSE;
   hide_lyrics();
   si->currentstaffnum = num;
   si->currentstaff = staff;
   show_lyrics();
+  return TRUE;
 }
 /**
  * Mouse motion callback 
@@ -358,7 +359,7 @@ scorearea_motion_notify (GtkWidget * wid
 	gtk_widget_queue_draw (gui->scorearea);
       }
     }
-
+  return TRUE;
 }
 
 
diff -up denemo-0.8.6/src/objops.c.orig denemo-0.8.6/src/objops.c
--- denemo-0.8.6/src/objops.c.orig	2009-08-02 19:01:12.000000000 +0200
+++ denemo-0.8.6/src/objops.c	2009-08-03 00:04:16.000000000 +0200
@@ -247,7 +247,7 @@ free_directive_data(DenemoDirective *dir
 #undef DFREE
     if(directive->graphic && GTK_IS_WIDGET(directive->graphic)) {
       //g_print("We should destroy the widget now");
-      gtk_widget_destroy(directive->graphic);
+      gtk_widget_destroy((GtkWidget *)directive->graphic);
     }
       else	
    ; //  g_object_unref(directive->graphic); we leave these GdkBitmap in a hash table, and never discard them
@@ -282,10 +282,10 @@ dnm_clone_object (DenemoObject * orig)
 	      break;
 	    
 	    case TUPOPEN:
-	      ret  = newtupopen(((tupopen*)orig->object)->numerator, ((tupopen*)orig->object)->denominator);	  
+	      ret  = (DenemoObject *)newtupopen(((tupopen*)orig->object)->numerator, ((tupopen*)orig->object)->denominator);	  
 	      break;
 	    case TUPCLOSE:
-	      ret  = newtupclose();
+	      ret  = (DenemoObject *)newtupclose();
 	      break;
 	    case CLEF:
 	      ret = dnm_newclefobj (((clef *)orig->object)->type);
@@ -312,10 +312,10 @@ dnm_clone_object (DenemoObject * orig)
 	      ret = newstaffbreakobject ();
 	      break;
 	    case GRACE_START:
-	      ret = newgracestart ();
+	      ret = (DenemoObject *)newgracestart ();
 	      break;
 	    case GRACE_END:
-	      ret = newgraceend ();
+	      ret = (DenemoObject *)newgraceend ();
 	      break;
 	    case LILYDIRECTIVE: {
 	      lilydirective *curlily = (lilydirective*)orig->object;
diff -up denemo-0.8.6/src/pitchentry.c.orig denemo-0.8.6/src/pitchentry.c
--- denemo-0.8.6/src/pitchentry.c.orig	2009-08-02 19:01:12.000000000 +0200
+++ denemo-0.8.6/src/pitchentry.c	2009-08-03 00:04:16.000000000 +0200
@@ -5,6 +5,7 @@
  * (c)2007 Richard Shann
  */
 #include <math.h>
+#include <string.h> /* for strcmp() */
 #include "audio.h"
 #include "pitchentry.h"
 #include "view.h"
@@ -822,6 +823,7 @@ static stop_tuning_callback(){
   PR_tuning = FALSE;
   collect_data_for_tuning(PR_tuning);
   PR_indicator = NULL;
+  return FALSE;
 }
 
 
diff -up denemo-0.8.6/src/pitchrecog.c.orig denemo-0.8.6/src/pitchrecog.c
--- denemo-0.8.6/src/pitchrecog.c.orig	2009-08-02 19:01:12.000000000 +0200
+++ denemo-0.8.6/src/pitchrecog.c	2009-08-03 00:04:16.000000000 +0200
@@ -28,6 +28,7 @@
 #include <math.h>
 #include <aubio/aubio.h>
 #include <audio.h>
+#include <glib/gmessages.h>
 
 #ifdef HAVE_C99_VARARGS_MACROS
 #define debug(...)              if (verbose) fprintf (stderr, __VA_ARGS__)
@@ -302,6 +303,7 @@ extern int pa_main(aubio_process_func_t
 
 int set_silence(double shh) {
   silence = shh;
+  return 0;
 }
 int set_threshold(double thresh) { /* threshold requires memory allocation */
   STOP
@@ -318,7 +320,7 @@ int set_smoothing(double smooth ) { /* m
 int set_onset_type(unsigned onset) { 
   /* changing onset type requires memory allocation */
   if(onset>= sizeof(onset_types)/sizeof(aubio_onsetdetection_type))
-    return;
+    return 0;
   STOP
   type_onset = onset_types[onset];
   START
diff -up denemo-0.8.6/src/prefdialog.c.orig denemo-0.8.6/src/prefdialog.c
--- denemo-0.8.6/src/prefdialog.c.orig	2009-08-02 19:01:12.000000000 +0200
+++ denemo-0.8.6/src/prefdialog.c	2009-08-03 00:04:16.000000000 +0200
@@ -220,7 +220,7 @@ preferences_change (GtkAction *action, g
   GtkWidget *field =\
     gtk_check_button_new_with_label (thelabel); \
   gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (field),\
-				Denemo.prefs.field);\
+				(gboolean)Denemo.prefs.field);\
   gtk_box_pack_start (GTK_BOX (main_vbox), field, FALSE, TRUE, 0);\
   cbdata.field = field;
 
diff -up denemo-0.8.6/src/print.c.orig denemo-0.8.6/src/print.c
--- denemo-0.8.6/src/print.c.orig	2009-08-02 19:01:12.000000000 +0200
+++ denemo-0.8.6/src/print.c	2009-08-03 00:04:16.000000000 +0200
@@ -1001,7 +1001,7 @@ printarea_configure_event (GtkWidget * w
 {
   DenemoGUI *gui = Denemo.gui;
   if(gui->pixbuf==NULL)
-    return;
+    return TRUE;
   gint width, height;
   gdk_drawable_get_size (gui->printarea->window, &width, &height);
   GtkAdjustment * vadjust = gtk_range_get_adjustment(GTK_RANGE(gui->printvscrollbar));
@@ -1016,6 +1016,7 @@ printarea_configure_event (GtkWidget * w
 
   gtk_adjustment_changed(vadjust);
   gtk_adjustment_changed(hadjust);
+  return TRUE;
 }
 
 static gint adjust_x=0;
@@ -1045,8 +1046,9 @@ printarea_expose_event (GtkWidget * widg
 {
   DenemoGUI *gui = Denemo.gui;
   if(gui->pixbuf==NULL)
-    return;
+    return TRUE;
   draw_print(gui);
+  return TRUE;
 }
 
 
@@ -1117,7 +1119,7 @@ printarea_button_press (GtkWidget * widg
       g_free(msg);
     }
     offsetting = FALSE;
-    return;
+    return TRUE;
   }
   /*( creating a padding value? */
   if(padding) {
@@ -1132,7 +1134,7 @@ printarea_button_press (GtkWidget * widg
       g_free(msg);
     }
     padding = FALSE;
-    return;
+    return TRUE;
   }
 
 
diff -up denemo-0.8.6/src/runsilent.c.orig denemo-0.8.6/src/runsilent.c
--- denemo-0.8.6/src/runsilent.c.orig	2009-08-02 19:01:12.000000000 +0200
+++ denemo-0.8.6/src/runsilent.c	2009-08-03 00:04:16.000000000 +0200
@@ -23,6 +23,6 @@ silentconversion (char *file_in, DenemoG
     }
 
   file_out = "silentconversion.ly";
-  exportlilypond ((gchar *) file_out, si, TRUE);
+  exportlilypond ((gchar *) file_out, gui, TRUE);
   printf ("\nWritten to %s\n\n", file_out);
 };
diff -up denemo-0.8.6/src/scoreops.c.orig denemo-0.8.6/src/scoreops.c
--- denemo-0.8.6/src/scoreops.c.orig	2009-08-02 19:01:12.000000000 +0200
+++ denemo-0.8.6/src/scoreops.c	2009-08-03 00:04:16.000000000 +0200
@@ -335,6 +335,7 @@ static delete_all_staffs(DenemoGUI * gui
 #ifdef _HAVE_JACK_
   remove_all_jack_midi_ports();
 #endif
+  return TRUE;
 }
 
 /**
diff -up denemo-0.8.6/src/selectops.c.orig denemo-0.8.6/src/selectops.c
--- denemo-0.8.6/src/selectops.c.orig	2009-08-02 19:01:12.000000000 +0200
+++ denemo-0.8.6/src/selectops.c	2009-08-03 00:04:16.000000000 +0200
@@ -445,7 +445,7 @@ DenemoObject *get_mark_object(void){
   measurenode *firstmeasure = g_list_nth (firststaff->measures,  si->firstmeasuremarked - 1);
   objnode *firstobj = g_list_nth (firstmeasure->data, si->firstobjmarked);
   g_print("First %d\n",  si->firstobjmarked);
-  return firstobj? ((GList*)firstobj->data):NULL;
+  return firstobj? ((DenemoObject *)firstobj->data):NULL;
 }
 DenemoObject *get_point_object(void){
   DenemoGUI * gui = Denemo.gui;
@@ -456,7 +456,7 @@ DenemoObject *get_point_object(void){
   DenemoStaff *laststaff =  (DenemoStaff *) curstaff->data;
   measurenode *lastmeasure = g_list_nth (laststaff->measures,  si->lastmeasuremarked - 1);
   objnode *lastobj = g_list_nth (lastmeasure->data, si->lastobjmarked);
-  return lastobj? ((GList*)lastobj->data):NULL;
+  return lastobj? ((DenemoObject *)lastobj->data):NULL;
 }
 
 
diff -up denemo-0.8.6/src/staffops.c.orig denemo-0.8.6/src/staffops.c
--- denemo-0.8.6/src/staffops.c.orig	2009-08-02 19:01:12.000000000 +0200
+++ denemo-0.8.6/src/staffops.c	2009-08-03 00:04:16.000000000 +0200
@@ -192,12 +192,12 @@ newstaff (DenemoGUI * gui, enum newstaff
   {
     //hmm, cannot populate it, why not ? FIXME 
     GtkWidget *item;
-    thestaffstruct->staffmenu = gtk_menu_new();
+    thestaffstruct->staffmenu = (GtkMenu *)gtk_menu_new();
     item = gtk_menu_item_new_with_label("Edit Attributes");
     gtk_menu_shell_append(GTK_MENU_SHELL( thestaffstruct->staffmenu), item);
     g_signal_connect(G_OBJECT(item), "activate", G_CALLBACK(edit_staff_directive), NULL);
     gtk_widget_show(item);
-    thestaffstruct->voicemenu = gtk_menu_new();
+    thestaffstruct->voicemenu = (GtkMenu *)gtk_menu_new();
     item = gtk_menu_item_new_with_label("Edit Attributes");
     gtk_menu_shell_append(GTK_MENU_SHELL( thestaffstruct->voicemenu), item);
     g_signal_connect(G_OBJECT(item), "activate", G_CALLBACK(edit_voice_directive), NULL);
@@ -439,14 +439,14 @@ deletestaff (DenemoGUI * gui, gboolean i
     
   gboolean isprimary = ((int) curstaffstruct->voicenumber == 1);
   //FIXME free_staff()
-  gtk_widget_destroy((curstaffstruct->staffmenu));
-  gtk_widget_destroy((curstaffstruct->voicemenu));
+  gtk_widget_destroy((GtkWidget *)(curstaffstruct->staffmenu));
+  gtk_widget_destroy((GtkWidget *)(curstaffstruct->voicemenu));
   g_list_foreach (curstaffstruct->measures, freeobjlist, NULL);
   g_list_free (curstaffstruct->measures);
   g_string_free (curstaffstruct->denemo_name, FALSE);//FIXME these should all be TRUE??
   g_string_free (curstaffstruct->lily_name, FALSE);
   g_string_free (curstaffstruct->midi_instrument, FALSE);
-  g_list_foreach (curstaffstruct->verses, gtk_widget_destroy, NULL);
+  g_list_foreach (curstaffstruct->verses, (GFunc)gtk_widget_destroy, NULL);
   g_free (curstaffstruct);
 
   free_directives(curstaffstruct->staff_directives);
diff -up denemo-0.8.6/src/utils.c.orig denemo-0.8.6/src/utils.c
--- denemo-0.8.6/src/utils.c.orig	2009-08-02 19:01:12.000000000 +0200
+++ denemo-0.8.6/src/utils.c	2009-08-03 10:28:03.000000000 +0200
@@ -7,6 +7,7 @@
  */
 
 #include <stdio.h>
+#include <string.h> /*for SIGTERM */
 #include <gtk/gtk.h>
 #include "accwidths.h"
 #include <denemo/denemo.h>
@@ -400,14 +401,14 @@ gchar mid_c_offsettoname (gint mid_c_off
   return ((otn + 2) % 7) + 'a';
 }
 
-void *note2lilynotename(struct note *noteobject, GString *ret){
+void note2lilynotename(struct note *noteobject, GString *ret){
   gint mid_c_offset = noteobject->mid_c_offset;
 
   g_string_append_printf (ret, "%c",
 		    mid_c_offsettoname (mid_c_offset));
 }
 
-void *note2lilyaccidental(struct note *noteobject, GString *ret){
+void note2lilyaccidental(struct note *noteobject, GString *ret){
   gint enshift = noteobject->enshift;
   gint k;
   if (enshift < 0)
@@ -418,7 +419,7 @@ void *note2lilyaccidental(struct note *n
       g_string_append_printf (ret, "is");
 }
 
-void *note2lilyoctave(struct note* noteobject, GString *ret){
+void note2lilyoctave(struct note* noteobject, GString *ret){
   gint mid_c_offset = noteobject->mid_c_offset;
   gint octave = mid_c_offsettooctave (mid_c_offset);
   if (octave < 0)
@@ -429,17 +430,17 @@ void *note2lilyoctave(struct note* noteo
       g_string_append_printf (ret, "\'"); 
 }
 
-void *chord2lilyduration(struct chord *chordobject, GString *ret){
+void chord2lilyduration(struct chord *chordobject, GString *ret){
   chord2lilybaseduration(chordobject, ret);
   chord2lilynumdots(chordobject, ret);
 }
 
-void *chord2lilybaseduration(struct chord *chordobject, GString *ret){
+void chord2lilybaseduration(struct chord *chordobject, GString *ret){
   int baseduration = chordobject->baseduration;
   g_string_append_printf (ret,  "%d", baseduration);
 }
 
-void *chord2lilynumdots(struct chord *chordobject, GString *ret){
+void chord2lilynumdots(struct chord *chordobject, GString *ret){
   int numdots = chordobject->numdots;
   g_string_append_printf (ret, "%d",numdots);
 }
@@ -604,7 +605,7 @@ initdir ()
 {
 #ifndef G_OS_WIN32
   GError *error=NULL;
-  if(!gbr_init (&error)&& (error != GBR_INIT_ERROR_DISABLED))
+  if(!gbr_init (&error)&& (error != (GError *)GBR_INIT_ERROR_DISABLED))
     {
       g_print ("BinReloc failed to initialize:\n");
       g_print ("Domain: %d (%s)\n",
@@ -617,6 +618,8 @@ initdir ()
     }
 #endif /* not G_OS_WIN32 */
 }
+extern gchar *
+gbr_find_pkg_data_dir (const gchar * default_pkg_data_dir, const gchar * pkg_name);
 
 const gchar *
 get_data_dir ()
@@ -960,7 +963,7 @@ void nullify_gstring (GString **s) {
 gchar *
 string_dialog_entry (DenemoGUI *gui, gchar *title, gchar *instruction, gchar *initial_value)
 {
-  string_dialog_entry_with_widget (gui, title, instruction, initial_value, NULL);
+  return string_dialog_entry_with_widget (gui, title, instruction, initial_value, NULL);
 }
 
 /* as string_dialog_entry() but with extra widget */
@@ -1012,7 +1015,7 @@ string_dialog_entry_with_widget (DenemoG
 		gtk_widget_destroy (dialog);
 		return NULL;
 	}
-
+  return (gchar *)TRUE;
 }
 
 static gboolean
diff -up denemo-0.8.6/src/utils.h.orig denemo-0.8.6/src/utils.h
--- denemo-0.8.6/src/utils.h.orig	2009-08-02 19:01:12.000000000 +0200
+++ denemo-0.8.6/src/utils.h	2009-08-03 00:04:16.000000000 +0200
@@ -135,12 +135,12 @@ string_dialog_entry (DenemoGUI *gui, gch
 gchar *
 string_dialog_entry_with_widget (DenemoGUI *gui, gchar *title, gchar *instruction, gchar *initial_value, GtkWidget *extra_widget);
 
-void *note2lilynotename(struct note *noteobject, GString *ret);
-void *note2lilyaccidental(struct note *noteobject, GString *ret);
-void *note2lilyoctave(struct note* noteobject, GString *ret);
-void *chord2lilybaseduration(struct chord *chordobject, GString *ret);
-void *chord2lilyduration(struct chord *chordobject, GString *ret);
-void *chord2lilynumdots(struct chord *chordobject, GString *ret);	
+void note2lilynotename(struct note *noteobject, GString *ret);
+void note2lilyaccidental(struct note *noteobject, GString *ret);
+void note2lilyoctave(struct note* noteobject, GString *ret);
+void chord2lilybaseduration(struct chord *chordobject, GString *ret);
+void chord2lilyduration(struct chord *chordobject, GString *ret);
+void chord2lilynumdots(struct chord *chordobject, GString *ret);
 
 #define UTILS_H_PARAM_ASSIGN(param_name) if( (str = g_strstr_len(values->str+i,strlen(values->str+i), #param_name)))\
 nothing=FALSE,param_name = (*(str+strlen(#param_name))=='=')?str+strlen(#param_name)+1:NULL;
diff -up denemo-0.8.6/src/view.c.orig denemo-0.8.6/src/view.c
--- denemo-0.8.6/src/view.c.orig	2009-08-02 19:01:12.000000000 +0200
+++ denemo-0.8.6/src/view.c	2009-08-03 10:20:16.000000000 +0200
@@ -273,6 +273,7 @@ static SCM scheme_hide_menus(void) {
   toggle_main_menu(NULL, NULL);
   toggle_console_view (NULL, NULL);
   toggle_print_view (NULL, NULL);
+  return SCM_BOOL(TRUE);
 }
 
 
@@ -642,7 +643,7 @@ SCM scheme_get_command(void) {
  return  scm;
 }
 
-static get_drag_offset(GtkWidget *dialog, gint response_id, GtkLabel *label) {
+static void get_drag_offset(GtkWidget *dialog, gint response_id, GtkLabel *label) {
   g_object_set_data(G_OBJECT(dialog), "offset-response", (gpointer)response_id);
   if(response_id < 0)
     gtk_main_quit();
@@ -654,7 +655,7 @@ static get_drag_offset(GtkWidget *dialog
   g_free(text);
 }
 
-static get_drag_pad(GtkWidget *dialog, gint response_id, GtkLabel *label) {
+static void get_drag_pad(GtkWidget *dialog, gint response_id, GtkLabel *label) {
   g_object_set_data(G_OBJECT(dialog), "pad-response", (gpointer)response_id);
   if(response_id < 0)
     gtk_main_quit();
@@ -1447,6 +1448,7 @@ gint name2mid_c_offset(gchar *x, gint *m
 
   *mid_c_offset = *x-'c' + 7*octave;
   *enshift = accs;
+  return *mid_c_offset;
 }
 
 static SCM scheme_put_note_name (SCM optional) {
@@ -2833,7 +2835,7 @@ static gboolean append_rhythm(RhythmPatt
 }
 
 
-static gchar *add_to_pattern(gchar **p, gchar c) {
+static void add_to_pattern(gchar **p, gchar c) {
   gchar *temp = g_strdup_printf("%s%c", *p, c);
   g_free(*p);
   *p = temp;
@@ -3245,7 +3247,7 @@ void appendSchemeText(gchar *text) {
   gtk_text_buffer_insert(buffer, &enditer, text, -1);
 }
 
-static appendSchemeText_cb(GtkWidget *widget, gchar *text) {
+static void appendSchemeText_cb(GtkWidget *widget, gchar *text) {
   appendSchemeText(text);
 }
 
@@ -3937,11 +3939,12 @@ gboolean loadGraphicItem(gchar *name, Gd
   if(fp) {
     guchar wlo, whi, hlo, hhi;
     gint w, h;
-    fread(&wlo, 1, 1, fp);
-    fread(&whi, 1, 1, fp);
+    int n;
+    n = fread(&wlo, 1, 1, fp);
+    n = fread(&whi, 1, 1, fp);
 
-    fread(&hlo, 1, 1, fp);
-    fread(&hhi, 1, 1, fp);
+    n = fread(&hlo, 1, 1, fp);
+    n = fread(&hhi, 1, 1, fp);
     w = wlo+255*whi;
     h = hlo+255*hhi;
     gint numbytes = h*((w+7)/8)*8;
