Changeset 5586:5b82b3417705 in roaraudio for roard/roard.c


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

general cleanup for -Wextra

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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   } 
Note: See TracChangeset for help on using the changeset viewer.