Changeset 897:a45bed7cbef8 in roaraudio for libroar/vio.c


Ignore:
Timestamp:
11/23/08 12:46:39 (15 years ago)
Author:
phi
Branch:
default
Phase:
public
Message:

cast 64 bit correct to avoid compiler warnings

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libroar/vio.c

    r886 r897  
    3535#include "libroar.h" 
    3636 
     37// this is to avoid warning messages on platforms 
     38// where sizeof(void*) == 8 and szeof(int) == 4 
     39#ifdef __LP64__ 
     40#define INSTINT long int 
     41#else 
     42#define INSTINT int 
     43#endif 
     44 
    3745int roar_vio_init_calls (struct roar_vio_calls * calls) { 
    3846 if ( !calls ) 
     
    6472 
    6573int roar_vio_set_fh   (struct roar_vio_calls * vio, int fh) { 
    66  return roar_vio_set_inst(vio, (void*)(fh + 1)); 
     74 return roar_vio_set_inst(vio, (void*)(INSTINT)(fh + 1)); 
    6775} 
    6876 
     
    7179  return -1; 
    7280 
    73  return ((int)vio->inst) - 1; 
     81 return ((int)(INSTINT)vio->inst) - 1; 
    7482} 
    7583 
Note: See TracChangeset for help on using the changeset viewer.