Changeset 4521:4277b6a0c8a1 in roaraudio for roard/midi.c


Ignore:
Timestamp:
10/16/10 17:09:23 (14 years ago)
Author:
phi
Branch:
default
Phase:
public
Message:

fixed a lot compiler warnings

File:
1 edited

Legend:

Unmodified
Added
Removed
  • roard/midi.c

    r3764 r4521  
    136136 struct roar_stream_server *  ss; 
    137137 struct roar_buffer        *   b; 
    138  char                      * buf; 
     138 void                      * buf; 
    139139 ssize_t                     len; 
    140140 
     
    157157 } 
    158158 
    159  if ( roar_buffer_new_data(&b, MIDI_READ_SIZE, (void**)&buf) == -1 ) { 
     159 if ( roar_buffer_new_data(&b, MIDI_READ_SIZE, &buf) == -1 ) { 
    160160  ROAR_ERR("midi_check_stream(*): Can not alloc buffer space!"); 
    161161  ROAR_DBG("midi_check_stream(*) = -1"); 
     
    213213 
    214214int midi_conv_midi2mes (int id) { 
     215 void          * bufdata; 
    215216 unsigned char * data; 
    216217 struct roar_stream        *   s; 
     
    229230 
    230231 while (ss->buffer != NULL && alive) { 
    231   if ( roar_buffer_get_data(ss->buffer, (void**)&data) == -1 ) { 
     232  if ( roar_buffer_get_data(ss->buffer, &bufdata) == -1 ) { 
    232233   alive = 0; 
    233234   continue; 
    234235  } 
     236 
     237  data = bufdata; 
    235238 
    236239  if ( roar_buffer_get_len(ss->buffer, &have) == -1 ) { 
     
    375378 struct roar_buffer        * buf = g_midi_mess.buf; 
    376379 struct midi_message       * mes = NULL; 
     380 void                      * bufdata; 
    377381 unsigned char               data[3]; 
    378382 unsigned char             * d; 
     
    390394 
    391395 while (buf != NULL) { 
    392   if ( roar_buffer_get_data(buf, (void**)&mes) == -1 ) { 
     396  if ( roar_buffer_get_data(buf, &bufdata) == -1 ) { 
    393397   return -1; 
    394398  } 
     399 
     400  mes = bufdata; 
    395401 
    396402  if (mes->type == MIDI_TYPE_CLOCK_TICK || mes->type == MIDI_TYPE_CLOCK_START || mes->type == MIDI_TYPE_CLOCK_STOP ) { 
     
    455461 struct roar_buffer        * buf = g_midi_mess.buf; 
    456462 struct midi_message       * mes = NULL; 
     463 void                      * bufdata; 
    457464 
    458465 while (buf != NULL) { 
    459   if ( roar_buffer_get_data(buf, (void**)&mes) == -1 ) { 
     466  if ( roar_buffer_get_data(buf, &bufdata) == -1 ) { 
    460467   return -1; 
    461468  } 
     469 
     470  mes = bufdata; 
    462471 
    463472  if ( ssynth_eval_message(mes) == -1 ) 
     
    492501int midi_add_buf       (int id, struct roar_buffer * buf) { 
    493502 struct midi_message * mes; 
     503 void * bufdata; 
    494504 
    495505 if ( id == -1 || buf == NULL ) 
    496506  return -1; 
    497507 
    498  if ( roar_buffer_get_data(buf, (void**)&mes) == -1 ) 
    499   return -1; 
     508 if ( roar_buffer_get_data(buf, &bufdata) == -1 ) 
     509  return -1; 
     510 
     511 mes = bufdata; 
    500512 
    501513 ROAR_DBG("midi_add_buf(id=%i, buf=%p) = ?", id, buf); 
     
    803815 struct roar_buffer        * buf = g_midi_mess.buf; 
    804816 struct midi_message       * mes = NULL; 
     817 void                      * bufdata; 
    805818 
    806819 ROAR_DBG("midi_cb_readbuf(void) = ?"); 
     
    809822  ROAR_DBG("midi_cb_readbuf(void): buf=%p", buf); 
    810823 
    811   if ( roar_buffer_get_data(buf, (void**)&mes) == -1 ) { 
     824  if ( roar_buffer_get_data(buf, &bufdata) == -1 ) { 
    812825   return -1; 
    813826  } 
     827 
     828  mes = bufdata; 
    814829 
    815830  switch (mes->type) { 
Note: See TracChangeset for help on using the changeset viewer.