client: fix compile warnings

From Gianfranco Costamagna
This commit is contained in:
David Anderson 2013-04-25 01:39:03 -07:00
parent 2d8e1c39b6
commit 6c4b23e7d0
3 changed files with 8 additions and 8 deletions

View File

@ -462,7 +462,7 @@ bool CLIENT_STATE::cpu_benchmarks_poll() {
}
ndone++;
if (benchmark_descs[i].error) {
msg_printf(0, MSG_INFO, benchmark_descs[i].error_str);
msg_printf(0, MSG_INFO, "%s", benchmark_descs[i].error_str);
had_error = true;
}
}

View File

@ -82,7 +82,7 @@ void log_message_startup(const char* msg) {
time_string, msg
);
if (!gstate.executing_as_daemon) {
fprintf(stdout, evt_msg);
fprintf(stdout, "%s", evt_msg);
} else {
#ifdef _WIN32
LogEventInfoMessage(evt_msg);
@ -91,7 +91,7 @@ void log_message_startup(const char* msg) {
#elif defined (ANDROID)
__android_log_print(ANDROID_LOG_INFO, "BOINC", evt_msg);
#else
syslog(LOG_DAEMON|LOG_INFO, evt_msg);
syslog(LOG_DAEMON|LOG_INFO, "%s", evt_msg);
#endif
}
}
@ -115,7 +115,7 @@ void log_message_error(const char* msg) {
);
#endif
if (!gstate.executing_as_daemon) {
fprintf(stderr, evt_msg);
fprintf(stderr, "%s", evt_msg);
} else {
#ifdef _WIN32
LogEventErrorMessage(evt_msg);
@ -124,7 +124,7 @@ void log_message_error(const char* msg) {
#elif defined (ANDROID)
__android_log_print(ANDROID_LOG_ERROR, "BOINC", evt_msg);
#else
syslog(LOG_DAEMON|LOG_ERR, evt_msg);
syslog(LOG_DAEMON|LOG_ERR, "%s", evt_msg);
#endif
}
}
@ -138,7 +138,7 @@ void log_message_error(const char* msg, int error_code) {
time_string, msg, error_code
);
if (!gstate.executing_as_daemon) {
fprintf(stderr, evt_msg);
fprintf(stderr, "%s", evt_msg);
} else {
#ifdef _WIN32
LogEventErrorMessage(evt_msg);
@ -147,7 +147,7 @@ void log_message_error(const char* msg, int error_code) {
#elif defined (ANDROID)
__android_log_print(ANDROID_LOG_ERROR, "BOINC", evt_msg);
#else
syslog(LOG_DAEMON|LOG_ERR, evt_msg);
syslog(LOG_DAEMON|LOG_ERR, "%s", evt_msg);
#endif
}
}

View File

@ -848,7 +848,7 @@ void WORK_FETCH::write_request(FILE* f, PROJECT* p) {
if (log_flags.work_fetch_debug) {
char buf[256];
request_string(buf);
msg_printf(p, MSG_INFO, buf);
msg_printf(p, MSG_INFO, "%s", buf);
}
}