mirror of https://github.com/BOINC/boinc.git
Fix win compile warnings. Let's shoot for zero warnings, OK?
This commit is contained in:
parent
e95471d152
commit
0fc0f80c30
|
@ -1028,7 +1028,7 @@ void* throttler(void*) {
|
|||
|
||||
// Initialize diagnostics framework for this thread
|
||||
//
|
||||
diagnostics_thread_init(BOINC_DIAG_DEFAULTS);
|
||||
diagnostics_thread_init();
|
||||
|
||||
while (1) {
|
||||
client_mutex.lock();
|
||||
|
|
|
@ -188,7 +188,7 @@ static DWORD WINAPI WindowsMonitorSystemPowerThread( LPVOID ) {
|
|||
|
||||
// Initialize diagnostics framework for this thread
|
||||
//
|
||||
diagnostics_thread_init(BOINC_DIAG_DEFAULTS);
|
||||
diagnostics_thread_init();
|
||||
|
||||
wc.style = CS_GLOBALCLASS;
|
||||
wc.lpfnWndProc = (WNDPROC)WindowsMonitorSystemPowerWndProc;
|
||||
|
|
|
@ -420,7 +420,7 @@ int diagnostics_init(
|
|||
return BOINC_SUCCESS;
|
||||
}
|
||||
|
||||
int diagnostics_thread_init( int _flags ) {
|
||||
int diagnostics_thread_init() {
|
||||
// Install unhandled exception filters and signal traps.
|
||||
if (BOINC_SUCCESS != boinc_install_signal_handlers()) {
|
||||
return ERR_SIGNAL_OP;
|
||||
|
|
|
@ -80,7 +80,7 @@ extern int boinc_finish_diag();
|
|||
extern int diagnostics_init(
|
||||
int flags, const char* stdout_prefix, const char* stderr_prefix
|
||||
);
|
||||
extern int diagnostics_thread_init( int flags );
|
||||
extern int diagnostics_thread_init();
|
||||
extern int diagnostics_finish();
|
||||
extern int diagnostics_is_initialized();
|
||||
extern int diagnostics_is_flag_set(int flags);
|
||||
|
|
|
@ -94,6 +94,8 @@ int suspend_or_resume_threads(
|
|||
) {
|
||||
HANDLE threads, thread;
|
||||
THREADENTRY32 te = {0};
|
||||
int retval = 0;
|
||||
DWORD n;
|
||||
|
||||
#ifdef DEBUG
|
||||
fprintf(stderr, "start: check_exempt %d %s\n", check_exempt, precision_time_to_string(dtime()));
|
||||
|
@ -129,16 +131,17 @@ int suspend_or_resume_threads(
|
|||
if (!in_vector(te.th32OwnerProcessID, pids)) continue;
|
||||
thread = OpenThread(THREAD_SUSPEND_RESUME, FALSE, te.th32ThreadID);
|
||||
if (resume) {
|
||||
DWORD n = ResumeThread(thread);
|
||||
n = ResumeThread(thread);
|
||||
#ifdef DEBUG
|
||||
fprintf(stderr, "ResumeThread returns %d\n", n);
|
||||
#endif
|
||||
} else {
|
||||
DWORD n = SuspendThread(thread);
|
||||
n = SuspendThread(thread);
|
||||
#ifdef DEBUG
|
||||
fprintf(stderr, "SuspendThread returns %d\n", n);
|
||||
#endif
|
||||
}
|
||||
if (n == -1) retval = -1;
|
||||
CloseHandle(thread);
|
||||
} while (Thread32Next(threads, &te));
|
||||
|
||||
|
@ -146,7 +149,7 @@ int suspend_or_resume_threads(
|
|||
#ifdef DEBUG
|
||||
fprintf(stderr, "end: %s\n", precision_time_to_string(dtime()));
|
||||
#endif
|
||||
return 0;
|
||||
return retval;
|
||||
}
|
||||
|
||||
#else
|
||||
|
|
Loading…
Reference in New Issue