X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=python%2Fmidi.c;h=ec57ef72841f0cb2b3721e2918ec8c1ff9ca7a7f;hb=754cc32a99b43f5fee5ebf7ed1213017268d4939;hp=ef6c7af810455d315e2e059c552e37f0c05a7b12;hpb=7f117baaef951b95e491cbe0a98785d35657ef2a;p=lilypond.git diff --git a/python/midi.c b/python/midi.c index ef6c7af810..ec57ef7284 100644 --- a/python/midi.c +++ b/python/midi.c @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 2001--2006 Han-Wen Nienhuys + (c) 2001--2009 Han-Wen Nienhuys Jan Nieuwenhuizen */ @@ -273,7 +273,6 @@ static PyObject * midi_parse_track (unsigned char **track, unsigned char *track_end) { unsigned int time = 0; - unsigned char running_status; unsigned long track_len, track_size; PyObject *pytrack = 0; @@ -305,6 +304,8 @@ midi_parse_track (unsigned char **track, unsigned char *track_end) { PyObject *pytime = PyInt_FromLong (0L); + unsigned char running_status = 0; + while (*track < track_end) { long dt = get_variable_length_number(track, track_end); @@ -332,8 +333,6 @@ pymidi_parse_track (PyObject *self, PyObject *args) unsigned char *track, *track_end; unsigned long track_size; - PyObject * sobj = PyTuple_GetItem (args, 0); - debug_print ("%s", "\n"); if (!PyArg_ParseTuple (args, "s#", &track, &track_size)) return 0; @@ -373,7 +372,7 @@ midi_parse (unsigned char **midi,unsigned char *midi_end) if (division < 0) - /* return midi_error ("can't handle non-metrical time"); */ + /* return midi_error (cannot handle non-metrical time"); */ ; *midi += header_len - 6; @@ -394,8 +393,6 @@ pymidi_parse (PyObject *self, PyObject *args) unsigned char *midi, *midi_end; unsigned long midi_size; - PyObject *sobj = PyTuple_GetItem (args, 0); - debug_print ("%s", "\n"); if (!PyArg_ParseTuple (args, "s#", &midi, &midi_size)) return 0; @@ -430,5 +427,10 @@ initmidi (void) add_constants (d); Midi_warning = PyString_FromString ("midi.warning"); PyDict_SetItemString (d, "warning", Midi_warning); + + /* + FIXME. + */ + (void) midi_warning; }