Changeset 6034:ac2a2a593b1f in roaraudio


Ignore:
Timestamp:
10/10/14 11:10:34 (5 years ago)
Author:
phi
Branch:
default
Message:

creatively work around useless and wrong compiler warnings

File:
1 edited

Legend:

Unmodified
Added
Removed
  • roard/req.c

    r6021 r6034  
    758758int req_on_gettimeofday (int client, struct roar_message * mes, char ** data, uint32_t flags[2]) { 
    759759 struct roar_time curtime; 
     760 uint64_t * d64 = (uint64_t *)mes->data; 
    760761 
    761762 ROAR_DBG("req_on_gettimeofday(client=%i, mes=%p, data=%p, flags=%p) = ?", client, mes, data, flags); 
     
    774775 
    775776 if ( mes->datalen >= 8 ) { 
    776   if ( *(uint64_t *)mes->data != 0 ) { 
     777  if ( *d64 != 0 ) { 
    777778   return -1; 
    778779  } 
     
    10011002 
    10021003int req_on_get_standby (int client, struct roar_message * mes, char ** data, uint32_t flags[2]) { 
     1004 uint16_t * d16 = (uint16_t*)mes->data; 
     1005 
    10031006 mes->cmd     = ROAR_CMD_OK; 
    10041007 mes->pos     = g_pos; 
    10051008 mes->datalen = 2; 
    10061009 
    1007  *((uint16_t*)mes->data) = ROAR_HOST2NET16((unsigned) g_standby); 
     1010 *d16 = ROAR_HOST2NET16((unsigned) g_standby); 
    10081011 
    10091012 return 0; 
     
    10111014 
    10121015int req_on_set_standby (int client, struct roar_message * mes, char ** data, uint32_t flags[2]) { 
     1016 uint16_t * d16 = (uint16_t*)mes->data; 
     1017 
    10131018 if ( mes->datalen != 2 ) 
    10141019  return -1; 
    10151020 
    1016  g_standby = ROAR_NET2HOST16(*((uint16_t*)mes->data)); 
     1021 g_standby = ROAR_NET2HOST16(*d16); 
    10171022 
    10181023 mes->cmd     = ROAR_CMD_OK; 
Note: See TracChangeset for help on using the changeset viewer.