Changeset 483:3bf1acf53dda in roaraudio


Ignore:
Timestamp:
08/13/08 02:21:17 (16 years ago)
Author:
phi
Branch:
default
Phase:
public
Message:

suppress warnings about sizeof(void*) != sizeof(int)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • roard/driver_roar.c

    r0 r483  
    22 
    33#include "roard.h" 
     4 
     5// this is to avoid warning messages on platforms 
     6// where sizeof(void*) == 8 and szeof(int) == 4 
     7#ifdef __LP64__ 
     8#define INSTINT long int 
     9#else 
     10#define INSTINT int 
     11#endif 
    412 
    513int driver_roar_open(DRIVER_USERDATA_T * inst, char * device, struct roar_audio_info * info) { 
     
    1927*/ 
    2028 
    21  *(int*)inst =  roar_simple_play(info->rate, info->channels, info->bits, info->codec, device, "roard"); 
     29 *(INSTINT*)inst =  roar_simple_play(info->rate, info->channels, info->bits, info->codec, device, "roard"); 
    2230 
    23  if ( *(int*)inst == -1 ) 
     31 if ( *(INSTINT*)inst == -1 ) 
    2432  return -1; 
    2533 
     
    2836 
    2937int driver_roar_close(DRIVER_USERDATA_T   inst) { 
    30  return roar_simple_close((int)inst); 
     38 return roar_simple_close((INSTINT)inst); 
    3139} 
    3240 
     
    3644 
    3745int driver_roar_write(DRIVER_USERDATA_T   inst, char * buf, int len) { 
    38  return write((int)inst, buf, len); 
     46 return write((INSTINT)inst, buf, len); 
    3947} 
    4048 
    4149int driver_roar_read(DRIVER_USERDATA_T   inst, char * buf, int len) { 
    42  return read((int)inst, buf, len); 
     50 return read((INSTINT)inst, buf, len); 
    4351} 
    4452 
Note: See TracChangeset for help on using the changeset viewer.