summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremiah Benham <jjbenham@chicagoguitar.com>2011-02-11 23:07:22 -0600
committerJeremiah Benham <jjbenham@chicagoguitar.com>2011-02-11 23:07:22 -0600
commit19378997b6652be3e790b0ec6f35cbb4a6118f7c (patch)
tree8ef3216bc75dc2344fe96fece80ba25d375946ea
parent3ec38292108d0ee4373229c4707082fa88ee1134 (diff)
remove warnings
-rw-r--r--include/denemo/denemo_types.h2
-rw-r--r--src/contexts.c6
-rw-r--r--src/exportmidi.c3
-rw-r--r--src/fluid.c12
-rw-r--r--src/http.c2
-rw-r--r--src/kbd-interface.c4
-rw-r--r--src/keyresponses.c2
-rw-r--r--src/lyric.c2
-rw-r--r--src/main.c7
-rw-r--r--src/measureops.c8
-rw-r--r--src/midi.c16
-rw-r--r--src/objops.c2
-rw-r--r--src/scoreops.c2
-rw-r--r--src/selectops.c6
-rw-r--r--src/view.c7
15 files changed, 40 insertions, 41 deletions
diff --git a/include/denemo/denemo_types.h b/include/denemo/denemo_types.h
index 89a57509..e8e4082b 100644
--- a/include/denemo/denemo_types.h
+++ b/include/denemo/denemo_types.h
@@ -409,7 +409,7 @@ typedef struct DenemoPrefs
gint maxhistory;/**< how long a history of used files to retain */
GString *browser; /**< Default browser string */
- gchar *midi_audio_output; /**< How the user wants to deal with audio/midi output */
+ const gchar *midi_audio_output; /**< How the user wants to deal with audio/midi output */
GString *csoundcommand; /**< command used to execute csound */
GString *csoundorcfile; /**< Path to .orc file used for csound playback */
gboolean rtcs; /**< Real time csound */
diff --git a/src/contexts.c b/src/contexts.c
index 42f695c6..7d2c09b9 100644
--- a/src/contexts.c
+++ b/src/contexts.c
@@ -107,17 +107,17 @@ gpointer get_prevailing_context(DenemoObjType type) {
switch(type) {
case CLEF:
obj = find_context_of_object(Denemo.gui->si, CLEF);
- if(obj==NULL) obj = &curstaff->clef;
+ if(obj==NULL) obj = (DenemoObject *) &curstaff->clef;
else obj = obj->object;
break;
case KEYSIG:
obj = find_context_of_object(Denemo.gui->si, KEYSIG);
- if(obj==NULL) obj = &curstaff->keysig;
+ if(obj==NULL) obj = (DenemoObject *) &curstaff->keysig;
else obj = obj->object;
break;
case TIMESIG:
obj = find_context_of_object(Denemo.gui->si, TIMESIG);
- if(obj==NULL) obj = &curstaff->timesig;
+ if(obj==NULL) obj = (DenemoObject *) &curstaff->timesig;
else obj = obj->object;
break;
default:
diff --git a/src/exportmidi.c b/src/exportmidi.c
index c8cfffcf..891b53e3 100644
--- a/src/exportmidi.c
+++ b/src/exportmidi.c
@@ -1899,8 +1899,7 @@ exportmidi (gchar * thefilename, DenemoScore * si, gint start, gint end)
}
if(debug){
printf("\nmeasure is empty = %d", measure_is_empty);
- printf("\nticks_at_bar(%d) + measurewidth(%d)!= "
- "ticks_read(%d)\n",
+ printf("\nticks_at_bar %ld + measurewidth %d != ticks_read %ld\n",
ticks_at_bar, measurewidth, ticks_read);
printf("\ninternal ticks = %d\n", internaltoticks(0));
}
diff --git a/src/fluid.c b/src/fluid.c
index 76e12534..239e02e0 100644
--- a/src/fluid.c
+++ b/src/fluid.c
@@ -203,7 +203,7 @@ void fluid_playpitch(int key, int duration, int channel, int volume)
if (synth){
//g_print("Emitting key %d\n", key);
fluid_synth_noteon(synth, channel, key, (volume?volume:127)*Denemo.gui->si->master_volume);
- g_timeout_add(duration, noteoff_callback, (gpointer)( (channel<<8) + key));
+ g_timeout_add(duration,(GSourceFunc) noteoff_callback, (gpointer)( (channel<<8) + key));
}
}
@@ -473,8 +473,8 @@ void fluid_midi_play(gchar *callback)
smf_rewind(Denemo.gui->si->smf);
last_draw_time = 0.0;
- g_idle_add(fluidsynth_play_smf_event, callback_string->str);
- smf_seek_to_seconds(gui->si->smf, pause_time>0.0? pause_time:gui->si->start_time);
+ g_idle_add((GSourceFunc)fluidsynth_play_smf_event, callback_string->str);
+ gint error = smf_seek_to_seconds(gui->si->smf, pause_time>0.0? pause_time:gui->si->start_time);
}
@@ -553,7 +553,7 @@ static void load_midi_buf(gint type, gint key, gint vel) {
}
//Under Interrupt
-static void handle_midi_in(void* data, fluid_midi_event_t* event)
+static handle_midi_event_func_t handle_midi_in(void* data, fluid_midi_event_t* event)
{
int type =
fluid_midi_event_get_type(event);
@@ -624,6 +624,7 @@ static void handle_midi_in(void* data, fluid_midi_event_t* event)
default:
g_warning("not handled type %x\n", type);
}
+ return 0;
}
@@ -640,7 +641,8 @@ fluid_start_midi_in(void)
success = fluid_settings_setstr(settings, "midi.driver", "alsa_seq");
#endif
//g_print("success %d\n", success);
- midi_in = new_fluid_midi_driver(settings, handle_midi_in, NULL);
+ midi_in = new_fluid_midi_driver(settings,
+ (handle_midi_event_func_t) handle_midi_in, NULL);
//g_print("midi in on %p\n", midi_in);
diff --git a/src/http.c b/src/http.c
index 94ba8fc8..6302b9b8 100644
--- a/src/http.c
+++ b/src/http.c
@@ -76,7 +76,7 @@ gchar * process_http(int sockfd, char *host, char *page, gchar *other, char *pos
"%s", page, host, other, strlen(poststr), poststr);
//g_print("about to write %s\n", out->str);
- write(sockfd, out->str, out->len);
+ gint error = write(sockfd, out->str, out->len);
g_string_free(out, TRUE);
while ((n = read(sockfd, recvline, MAXLINE)) > 0) {
diff --git a/src/kbd-interface.c b/src/kbd-interface.c
index 634e8dff..52c15389 100644
--- a/src/kbd-interface.c
+++ b/src/kbd-interface.c
@@ -368,13 +368,13 @@ configure_keyboard_dialog_init_idx (GtkAction * action, DenemoGUI * gui,
(GtkAttachOptions) (0), 0, 0);
addbutton = gtk_button_new_from_stock (GTK_STOCK_ADD);
- gtk_button_set_label(addbutton, "Add One Key Shortcut");
+ gtk_button_set_label(GTK_BUTTON(addbutton), "Add One Key Shortcut");
gtk_box_pack_end (GTK_BOX (vbox), addbutton, FALSE, TRUE, 0);
add2button = gtk_button_new_from_stock (GTK_STOCK_ADD);
- gtk_button_set_label(add2button, "Add Two Key Shortcut");
+ gtk_button_set_label(GTK_BUTTON(add2button), "Add Two Key Shortcut");
gtk_box_pack_end (GTK_BOX (vbox), add2button, FALSE, TRUE, 0);
diff --git a/src/keyresponses.c b/src/keyresponses.c
index d9c08238..71aee66b 100644
--- 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);
diff --git a/src/lyric.c b/src/lyric.c
index a1a2e1b0..8249e392 100644
--- a/src/lyric.c
+++ b/src/lyric.c
@@ -66,7 +66,7 @@ GtkWidget * add_verse_to_staff(DenemoScore *si, DenemoStaff *staff) {
//if(si->currentstaff && si->currentstaff->data == staff)
// gtk_widget_show(staff->currentverse->data);
textview = new_lyric_editor();
- gtk_text_view_set_wrap_mode (textview, GTK_WRAP_WORD_CHAR);
+ gtk_text_view_set_wrap_mode (GTK_TEXT_VIEW(textview), GTK_WRAP_WORD_CHAR);
gtk_widget_show(textview);
staff->verses = g_list_append(staff->verses, textview);
staff->currentverse = g_list_last(staff->verses);
diff --git a/src/main.c b/src/main.c
index d90e6cba..051efac5 100644
--- a/src/main.c
+++ b/src/main.c
@@ -415,9 +415,7 @@ void
debug_handler (const gchar *log_domain, GLogLevelFlags log_level,
const gchar *message, gpointer user_data)
{
-#ifdef DEBUG
- g_print (message);
-#endif
+ //g_debug ("%s",message);
}
@@ -438,7 +436,8 @@ main (int argc, char *argv[])
//#endif
/* set the default handler for debug messages */
- g_log_set_handler (NULL, G_LOG_LEVEL_DEBUG, debug_handler, NULL);
+ //FIXME this does not work
+ //g_log_set_handler (NULL, G_LOG_LEVEL_DEBUG, debug_handler, NULL);
/* initialization of directory relocatability */
diff --git a/src/measureops.c b/src/measureops.c
index a5fcbc36..85558be3 100644
--- a/src/measureops.c
+++ b/src/measureops.c
@@ -139,10 +139,10 @@ staffremovemeasures (staffnode * curstaff, guint pos)
firstmeasure = firstmeasurenode (curstaff);
delmeasure = g_list_nth (firstmeasure, pos);
if(delmeasure) {
-#ifdef DEBUG
- g_print ("Firstmeasure %x\t DelMeasure %x \t Position\n",
- firstmeasure, delmeasure, pos);
-#endif
+
+ // g_debug ("Firstmeasure %x\t DelMeasure %x \t Position\n",
+ // firstmeasure, delmeasure, pos);
+
freeobjlist (delmeasure->data, NULL);
((DenemoStaff *) curstaff->data)->measures =
diff --git a/src/midi.c b/src/midi.c
index a2a3aa95..784097dd 100644
--- a/src/midi.c
+++ b/src/midi.c
@@ -529,20 +529,20 @@ DenemoObject *get_obj_for_start_time(smf_t *smf, gdouble time) {
if(time<0.0)
time=0.0;
static smf_event_t *event;
- static gint smfsync;
- static last_si = NULL;
+ static guint smfsync;
+ static DenemoScore *last_si = NULL;
static gdouble last_time=-1.0;
if( fabs(time-last_time)>0.001 || (last_si!=Denemo.gui->si) || (smfsync!=Denemo.gui->si->smfsync)) {
smf_event_t *initial = smf_peek_next_event(smf);
gdouble total = smf_get_length_seconds(smf);
time = (time>total?total:time);
- smf_seek_to_seconds(smf, time);
+ gint error = smf_seek_to_seconds(smf, time);
do {
event = smf_get_next_event(smf);
} while(event && (!(event->midi_buffer[0] & MIDI_NOTEON) || !event->user_pointer));
if(initial)
- smf_seek_to_event(smf, initial);
+ error = smf_seek_to_event(smf, initial);
last_si = Denemo.gui->si;
smfsync = Denemo.gui->si->smfsync;
last_time = time;
@@ -556,20 +556,20 @@ DenemoObject *get_obj_for_end_time(smf_t *smf, gdouble time) {
if(time<0.0)
time=0.0;
static smf_event_t *event = NULL;
- static gint smfsync;
- static last_si = NULL;
+ static guint smfsync;
+ static DenemoScore * last_si = NULL;
static gdouble last_time=-1.0;
if( fabs(time-last_time)>0.001 || (last_si!=Denemo.gui->si) || (smfsync!=Denemo.gui->si->smfsync)) {
smf_event_t *initial = smf_peek_next_event(smf);
gdouble total = smf_get_length_seconds(smf);
time = (time>total?total:time);
- smf_seek_to_seconds(smf, time);
+ gint error = smf_seek_to_seconds(smf, time);
do {
event = smf_get_next_event(smf);
} while(event && (!(event->midi_buffer[0] & MIDI_NOTEOFF) || !event->user_pointer));
if(initial)
- smf_seek_to_event(smf, initial);
+ error = smf_seek_to_event(smf, initial);
last_si = Denemo.gui->si;
smfsync = Denemo.gui->si->smfsync;
last_time = time;
diff --git a/src/objops.c b/src/objops.c
index a298e6fd..222080ab 100644
--- a/src/objops.c
+++ b/src/objops.c
@@ -269,7 +269,7 @@ free_directive_data(DenemoDirective *directive) {
}
if(directive->widget && G_IS_OBJECT(directive->widget)) {
//g_print("We should destroy the widget now ");
- GtkWidget *texteditor = (GtkWidget*)g_object_get_data(directive->widget, DENEMO_TEXTEDITOR_TAG);
+ GtkWidget *texteditor = (GtkWidget*)g_object_get_data(G_OBJECT(directive->widget), DENEMO_TEXTEDITOR_TAG);
if(texteditor)
gtk_widget_destroy(texteditor);//FIXME we may need to destroy its parents
gtk_widget_destroy((GtkWidget *)directive->widget);
diff --git a/src/scoreops.c b/src/scoreops.c
index ff774cb5..8edb5b6c 100644
--- a/src/scoreops.c
+++ b/src/scoreops.c
@@ -434,7 +434,7 @@ GList *extract_verses(GList *verses){
GList *g;
for(g=verses;g;g=g->next) {
GtkTextView *srcVerse = g->data;
- ret = g_list_append(ret, get_text_from_view(srcVerse));
+ ret = g_list_append(ret, get_text_from_view(GTK_WIDGET(srcVerse)));
}
return ret;
}
diff --git a/src/selectops.c b/src/selectops.c
index 59364d7a..bb15f190 100644
--- a/src/selectops.c
+++ b/src/selectops.c
@@ -584,10 +584,10 @@ pastefrombuffer (void)
curstaff? curstaff = si->currentstaff:0, curbuffernode = curbuffernode->next)
{
- g_debug ("Current staff %x, Current Staff Next %x,"
+ /*g_debug ("Current staff %x, Current Staff Next %x,"
" CurBuf %x, CurBuf Next %x\n",
curstaff, curstaff->next, curbuffernode, curbuffernode->next);
-
+ */
//gint prevailing_clef = find_prevailing_clef(si);
curmeasure = g_list_nth (firstmeasurenode (curstaff),
@@ -1207,7 +1207,7 @@ gboolean take_snapshot(void) {
static print_queue(gchar *msg, GQueue *q) {
GList*g;
- g_print(msg);
+ g_debug("%s",msg);
for(g=q->head;g;g=g->next) {
DenemoUndoData *chunk = g->data;
switch(chunk->action) {
diff --git a/src/view.c b/src/view.c
index 9af67a6b..c655ba21 100644
--- a/src/view.c
+++ b/src/view.c
@@ -2658,8 +2658,7 @@ SCM scheme_get_midi(void) {
gboolean success = intercept_midi_event(&midi);
if(!success)
midi = 0;/* scripts should detect this impossible value and take action */
- gchar *buf = &midi;
- *buf &=0xF0;//do not return channel info
+ midi &=0xF0;//do not return channel info
SCM scm = scm_int2num (midi);
return scm;
}
@@ -4613,7 +4612,7 @@ void inner_main(void*closure, int argc, char **argv){
if(Denemo.prefs.autoupdate)
fetchcommands(NULL, NULL);
- gchar *save_default_keymap_file_on_entry = FALSE;
+ gboolean save_default_keymap_file_on_entry = FALSE;
#define choice1 "Simple\nQuick start users: use this until you have read the manual\n"
#define choice2 "Arranger\nExperienced Users: transcribing music, playing music in, transposing etc"
#define choice3 "Composer\nExperienced Users: entering and modifying music, working with selections WASD use etc"
@@ -4876,7 +4875,7 @@ close_gui ()
DenemoGUI *oldgui = Denemo.gui;
//gtk_widget_destroy (Denemo.page); //note switch_page from g_signal_connect (G_OBJECT(Denemo.notebook), "switch_page", G_CALLBACK(switch_page), NULL);
gint index = g_list_index(Denemo.guis, oldgui);
- gtk_notebook_remove_page(Denemo.notebook, index);
+ gtk_notebook_remove_page(GTK_NOTEBOOK(Denemo.notebook), index);
g_print("Removed %d\n", index);
Denemo.guis = g_list_remove (Denemo.guis, oldgui);//FIXME ?? or in the destroy callback??
g_free (oldgui);