diff --git a/clientscr/gfx_switcher.C b/clientscr/gfx_switcher.C index 2cbdb163d3..58015525ff 100644 --- a/clientscr/gfx_switcher.C +++ b/clientscr/gfx_switcher.C @@ -35,6 +35,7 @@ #define CREATE_LOG 0 +#if CREATE_LOG #ifdef __cplusplus extern "C" { #endif @@ -44,6 +45,7 @@ static void print_to_log_file(const char *format, ...); static void strip_cr(char *buf); #endif +#endif // if CREATE_LOG int main(int argc, char** argv) { passwd *pw; @@ -126,8 +128,8 @@ int main(int argc, char** argv) { } -static void print_to_log_file(const char *format, ...) { #if CREATE_LOG +static void print_to_log_file(const char *format, ...) { FILE *f; va_list args; char buf[256]; @@ -153,10 +155,8 @@ static void print_to_log_file(const char *format, ...) { fputs("\n", f); fflush(f); fclose(f); -#endif } -#if CREATE_LOG static void strip_cr(char *buf) { char *theCR; diff --git a/lib/shmem.C b/lib/shmem.C index d9d8bb840f..9a337ceedb 100644 --- a/lib/shmem.C +++ b/lib/shmem.C @@ -188,7 +188,7 @@ int create_shmem_mmap(char *path, size_t size, void** pp) { retval = fstat(fd, &sbuf); if (retval) return ERR_SHMGET; - if (sbuf.st_size < size) { + if (sbuf.st_size < (long)size) { // The following 2 lines extend the file and clear its new // area to all zeros because they write beyond the old EOF. // See the lseek man page for details. diff --git a/mac_installer/uninstall.cpp b/mac_installer/uninstall.cpp index f04f5aa9f1..8932c9bf03 100644 --- a/mac_installer/uninstall.cpp +++ b/mac_installer/uninstall.cpp @@ -44,7 +44,7 @@ static void DeleteLoginItem(void); static char * PersistentFGets(char *buf, size_t buflen, FILE *f); static pid_t FindProcessPID(char* name, pid_t thePID); static OSStatus QuitBOINCManager(OSType signature); -static void SleepTicks(UInt32 ticksToSleep); +//static void SleepTicks(UInt32 ticksToSleep); static Boolean ShowMessage(Boolean allowCancel, const char *format, ...); @@ -217,6 +217,8 @@ static OSStatus DoUninstall(void) { system ("dscl . -delete /groups/boinc_master"); system ("dscl . -delete /users/boinc_project"); system ("dscl . -delete /groups/boinc_project"); + + return 0; } @@ -662,6 +664,7 @@ bail: return err; } +#if 0 // Uses usleep to sleep for full duration even if a signal is received static void SleepTicks(UInt32 ticksToSleep) { UInt32 endSleep, timeNow, ticksRemaining; @@ -675,6 +678,7 @@ static void SleepTicks(UInt32 ticksToSleep) { ticksRemaining = endSleep - timeNow; } } +#endif static Boolean ShowMessage(Boolean allowCancel, const char *format, ...) {