Changeset 5586:5b82b3417705 in roaraudio


Ignore:
Timestamp:
07/22/12 02:24:07 (12 years ago)
Author:
phi
Branch:
default
Phase:
public
Message:

general cleanup for -Wextra

Location:
roard
Files:
15 edited

Legend:

Unmodified
Added
Removed
  • roard/auth.c

    r5381 r5586  
    104104 struct at_trust * t = &(key->at_data.trust); 
    105105 size_t i; 
     106 
     107 (void)authmes; 
    106108 
    107109 // we ship pids at the moment as cs does not contain a verifyed one. 
  • roard/clients.c

    r5580 r5586  
    915915 } 
    916916 
    917  if ( ret == len ) { 
     917 if ( ret == (ssize_t)len ) { 
    918918  if ( roar_buffer_next(&(cs->outbuf)) == -1 ) { 
    919919   clients_delete(id); 
     
    960960} 
    961961 
    962 int clients_send_mon  (struct roar_audio_info * sa, uint32_t pos) { 
     962int clients_send_mon  (struct roar_audio_info * sa) { 
    963963 int i; 
    964964// int fh; 
     
    10091009} 
    10101010 
    1011 int clients_send_filter(struct roar_audio_info * sa, uint32_t pos) { 
     1011int clients_send_filter(struct roar_audio_info * sa) { 
    10121012 struct roar_client * c; 
    10131013 int i; 
  • roard/driver.c

    r5388 r5586  
    293293 int ret; 
    294294 
    295  ROAR_DBG("driver_cdriver_open(inst=%p, device='%s', info=%p, fh=%i) = ?", inst, device, info, fh); 
     295 (void)sstream; 
     296 
     297 ROAR_DBG("driver_cdriver_open(inst=%p, device='%s', info=%p, fh=%i, sstream=%p) = ?", inst, device, info, fh, sstream); 
     298 
     299 if ( fh != -1 ) { 
     300  roar_err_set(ROAR_ERROR_NOTSUP); 
     301  return -1; 
     302 } 
    296303 
    297304 if (device == NULL) { 
     
    320327 
    321328int  driver_dummy_ctl(struct roar_vio_calls * vio, roar_vio_ctl_t cmd, void * data) { 
     329 (void)vio; 
     330 
    322331 switch (cmd) { 
    323332  case ROAR_VIO_CTL_NONBLOCK: 
  • roard/driver_esd.c

    r5381 r5586  
    2929int driver_esd_open_vio(struct roar_vio_calls * inst, char * device, struct roar_audio_info * info, int fh, struct roar_stream_server * sstream) { 
    3030 esd_format_t format = ESD_STREAM | ESD_PLAY; 
    31  char name[] = "roard"; 
     31 const char * name = "roard"; 
     32 
     33 (void)sstream; 
    3234 
    3335 if ( fh != -1 ) 
  • roard/include/client.h

    r5576 r5586  
    135135int clients_check      (int id); 
    136136int clients_flush      (int id); 
    137 int clients_send_mon   (struct roar_audio_info * sa, uint32_t pos); 
    138 int clients_send_filter(struct roar_audio_info * sa, uint32_t pos); 
     137int clients_send_mon   (struct roar_audio_info * sa); 
     138int clients_send_filter(struct roar_audio_info * sa); 
    139139 
    140140int clients_add_output (int id, struct roar_buffer ** buf); 
  • roard/include/sources.h

    r5381 r5586  
    5454int sources_add_new (struct roar_source * source, 
    5555                     char * driver, char * device, 
    56                      char * container, 
    5756                     char * options, int primary); 
    5857 
  • roard/lib.c

    r5568 r5586  
    3030 pid_t child; 
    3131 int fh[3] = {-1, -1, -1}; 
    32  int i; 
     32 size_t i; 
    3333 
    3434 ROAR_WARN("lib_run_bg(cmd='%s', ...): This function should never be called. Contact devels."); 
  • roard/loop.c

    r5381 r5586  
    127127  } else { 
    128128#endif 
    129    clients_send_filter(sa, g_pos); 
     129   clients_send_filter(sa); 
    130130//   streams_send_filter_all(); // this currently results in deadlocks. 
    131    clients_send_mon(sa, g_pos); 
     131   clients_send_mon(sa); 
    132132#ifdef ROAR_HAVE_USLEEP 
    133133  } 
  • roard/meta.c

    r5381 r5586  
    8686 
    8787int stream_meta_get   (int id, int type, const char * name, char * val, size_t len) { 
    88  int i, vallen; 
     88 size_t i; 
     89 size_t vallen; 
    8990 struct roar_stream_server * s = g_streams[id]; 
    9091 
  • roard/network.c

    r5585 r5586  
    4141 size_t num = 0; 
    4242 ssize_t ret; 
    43  int i; 
     43 size_t i; 
    4444 
    4545 for (i = 0; i < ROAR_MAX_LISTEN_SOCKETS; i++) { 
  • roard/plugins.c

    r5582 r5586  
    6565} 
    6666 
    67 static void inline plugins_delete(struct _roard_plugin * plugin) { 
     67static inline void plugins_delete(struct _roard_plugin * plugin) { 
    6868 int i; 
    6969 
     
    235235static int plugin_callback(enum roar_dl_fnreg_action action, int fn, int subtype, const void * object, size_t objectlen, int version, int options, void * userdata, struct roar_dl_lhandle * lhandle) { 
    236236 
     237 (void)options, (void)userdata; 
     238 
    237239 ROAR_DBG("plugin_callback(action=%i, fn=%i, subtype=%i, object=%p, objectlen=%llu, version=%i, options=0x%x, userdata=%p, lhandle=%p) = ?", (int)action, fn, subtype, object, (long long unsigned int)objectlen, version, options, userdata, lhandle); 
    238240 
  • roard/req.c

    r5581 r5586  
    7474 
    7575int req_on_noop        (int client, struct roar_message * mes, char ** data, uint32_t flags[2]) { 
     76 (void)client, (void)data, (void)flags; 
    7677 mes->cmd     = ROAR_CMD_OK; 
    7778 mes->pos     = g_pos; 
     
    8485 struct roar_client        * c; 
    8586 int max_len; 
     87 
     88 (void)data, (void)flags; 
    8689 
    8790 if ( mes->datalen < 1 ) 
     
    131134 int ret; 
    132135 
     136 (void)flags; 
     137 
    133138 clients_get_server(client, &cs); 
    134139 
     
    194199 
    195200int req_on_whoami      (int client, struct roar_message * mes, char ** data, uint32_t flags[2]) { 
     201 (void)data, (void)flags; 
     202 
    196203 mes->cmd     = ROAR_CMD_OK; 
    197204 mes->pos     = g_pos; 
  • roard/roard.c

    r5577 r5586  
    909909  if ( *addr == '/' ) { 
    910910   if ( grp != NULL || pwd != NULL ) { 
    911      if ( chown(addr, pwd != NULL ? pwd->pw_uid : -1, grp != NULL ? grp->gr_gid : -1) == -1 ) 
     911     if ( chown(addr, pwd != NULL ? pwd->pw_uid : (uid_t)-1, grp != NULL ? grp->gr_gid : (gid_t)-1) == -1 ) 
    912912      return -1; 
    913913   } 
     
    12421242// SLP: 
    12431243void register_slp_callback(SLPHandle hslp, SLPError errcode, void * cookie) { 
     1244 (void)hslp; 
    12441245 /* return the error code in the cookie */ 
    12451246 *(SLPError*)cookie = errcode; 
     
    13741375  i = 0; 
    13751376 
    1376   if ( trust_uid != -1 ) 
     1377  if ( trust_uid != (uid_t)-1 ) 
    13771378   key->trust.uids[i++] = trust_uid; 
    13781379 
     
    13861387  i = 0; 
    13871388 
    1388   if ( trust_gid != -1 ) 
     1389  if ( trust_gid != (gid_t)-1 ) 
    13891390   key->trust.gids[i++] = trust_gid; 
    13901391 
     
    26052606#if defined(ROAR_HAVE_SETGID) && defined(ROAR_HAVE_SETUID) && defined(ROAR_HAVE_IO_POSIX) 
    26062607  if ( pwd != NULL || grp != NULL ) { 
    2607    if ( chown(pidfile, pwd != NULL ? pwd->pw_uid : -1, grp != NULL ? grp->gr_gid : -1) == -1 ) { 
     2608   if ( chown(pidfile, pwd != NULL ? pwd->pw_uid : (uid_t)-1, grp != NULL ? grp->gr_gid : (gid_t)-1) == -1 ) { 
    26082609    ROAR_WARN("Can not change ownership of pidfile: %s: %s", pidfile, strerror(errno)); 
    26092610   } 
  • roard/sources.c

    r5388 r5586  
    111111  if ( !strcmp(g_source[i].name, driver) ) { 
    112112   if ( g_source[i].new_open != NULL ) { 
    113     return sources_add_new(&(g_source[i]), driver, device, container, options, primary); 
     113    return sources_add_new(&(g_source[i]), driver, device, options, primary); 
    114114   } else if ( g_source[i].old_open != NULL ) { 
    115115    return g_source[i].old_open(driver, device, container, options, primary); 
     
    127127int sources_add_new (struct roar_source * source, 
    128128                     char * driver, char * device, 
    129                      char * container, 
    130129                     char * options, int primary) { 
    131130 int  stream; 
     
    255254 struct roar_vio_defaults def; 
    256255 
     256 (void)driver; 
     257 
    257258 if ( roar_vio_dstr_init_defaults(&def, ROAR_VIO_DEF_TYPE_NONE, O_RDONLY, 0644) == -1 ) 
    258259  return -1; 
     
    282283 struct roar_vio_defaults def; 
    283284 
     285 (void)driver, (void)container; 
     286 
    284287 if ( roar_vio_dstr_init_defaults(&def, ROAR_VIO_DEF_TYPE_NONE, O_RDONLY, 0644) == -1 ) 
    285288  return -1; 
     
    385388 size_t len, i; 
    386389 
     390 (void)vio; 
     391 
    387392 ROAR_DBG("sources_radionoise_read(vio=%p, buf=%p, count=%llu) = 0", vio, buf, (long long unsigned int)count); 
    388393 
     
    418423 
    419424static int  sources_radionoise_ctl(struct roar_vio_calls * vio, roar_vio_ctl_t cmd, void * data) { 
     425 (void)vio, (void)data; 
     426 
    420427 if ( cmd == ROAR_VIO_CTL_NONBLOCK ) 
    421428  return 0; 
     
    428435 struct roar_stream_server * ss; 
    429436 struct roar_audio_info    * info; 
     437 
     438 (void)device, (void)driver; 
    430439 
    431440 if ( fh > -1 ) 
     
    455464 struct roar_stream        * s; 
    456465 
     466 (void)driver; 
     467 
    457468 if ( fh > -1 ) 
    458469  return -1; 
  • roard/ssynth.c

    r5381 r5586  
    288288 int id; 
    289289 
     290 (void)vv; 
     291 
    290292 ROAR_DBG("ssynth_note_off(note=%p, vv=%i) = ?", note, vv); 
    291293 
Note: See TracChangeset for help on using the changeset viewer.