mirror of https://github.com/BOINC/boinc.git
Merge pull request #3305 from BOINC/dpa_warning
scheduler: fix a compile warning. No functional change
This commit is contained in:
commit
649a8cec80
|
@ -18,9 +18,6 @@
|
|||
// Support for plan classes defined using an XML file.
|
||||
// See https://boinc.berkeley.edu/trac/wiki/AppPlanSpec
|
||||
|
||||
// logic for handling an XML specification of plan classes
|
||||
// see https://boinc.berkeley.edu/trac/wiki/AppPlanConfig
|
||||
|
||||
#include <cmath>
|
||||
|
||||
#include "util.h"
|
||||
|
@ -32,7 +29,7 @@
|
|||
|
||||
using std::string;
|
||||
|
||||
// this returns a numerical OS version for Darwin/OSX and Windows,
|
||||
// return a numerical OS version for Darwin/OSX and Windows,
|
||||
// letting us define numerical ranges for these OS versions
|
||||
//
|
||||
static double os_version_num(HOST h) {
|
||||
|
@ -82,7 +79,9 @@ static int android_version_num(HOST h) {
|
|||
return 0;
|
||||
}
|
||||
|
||||
static bool wu_is_infeasible_for_plan_class(const PLAN_CLASS_SPEC* pc, const WORKUNIT* wu) {
|
||||
static bool wu_is_infeasible_for_plan_class(
|
||||
const PLAN_CLASS_SPEC* pc, const WORKUNIT* wu
|
||||
) {
|
||||
if (pc->min_wu_id && wu->id < pc->min_wu_id) {
|
||||
if (config.debug_version_select) {
|
||||
log_messages.printf(MSG_NORMAL,
|
||||
|
@ -104,7 +103,7 @@ static bool wu_is_infeasible_for_plan_class(const PLAN_CLASS_SPEC* pc, const WOR
|
|||
if (pc->min_batch && wu->batch < pc->min_batch) {
|
||||
if (config.debug_version_select) {
|
||||
log_messages.printf(MSG_NORMAL,
|
||||
"[version] batch#%ld too old for plan class '%s' (%ld)\n",
|
||||
"[version] batch#%d too old for plan class '%s' (%ld)\n",
|
||||
wu->batch, pc->name, pc->min_batch
|
||||
);
|
||||
}
|
||||
|
@ -113,7 +112,7 @@ static bool wu_is_infeasible_for_plan_class(const PLAN_CLASS_SPEC* pc, const WOR
|
|||
if (pc->max_batch && wu->batch > pc->max_batch) {
|
||||
if (config.debug_version_select) {
|
||||
log_messages.printf(MSG_NORMAL,
|
||||
"[version] batch#%ld too new for plan class '%s' (%ld)\n",
|
||||
"[version] batch#%d too new for plan class '%s' (%ld)\n",
|
||||
wu->batch, pc->name, pc->max_batch
|
||||
);
|
||||
}
|
||||
|
@ -198,7 +197,9 @@ bool PLAN_CLASS_SPEC::opencl_check(OPENCL_DEVICE_PROP& opencl_prop) {
|
|||
// See whether the given host/user can be sent this plan class.
|
||||
// If so return the resource usage and estimated FLOPS in hu.
|
||||
//
|
||||
bool PLAN_CLASS_SPEC::check(SCHEDULER_REQUEST& sreq, HOST_USAGE& hu, const WORKUNIT* wu) {
|
||||
bool PLAN_CLASS_SPEC::check(
|
||||
SCHEDULER_REQUEST& sreq, HOST_USAGE& hu, const WORKUNIT* wu
|
||||
) {
|
||||
COPROC* cpp = NULL;
|
||||
bool can_use_multicore = true;
|
||||
string msg;
|
||||
|
@ -981,11 +982,11 @@ bool PLAN_CLASS_SPEC::check(SCHEDULER_REQUEST& sreq, HOST_USAGE& hu, const WORKU
|
|||
#endif
|
||||
|
||||
return true;
|
||||
|
||||
}
|
||||
|
||||
bool PLAN_CLASS_SPECS::check(
|
||||
SCHEDULER_REQUEST& sreq, char* plan_class, HOST_USAGE& hu, const WORKUNIT* wu
|
||||
SCHEDULER_REQUEST& sreq, char* plan_class, HOST_USAGE& hu,
|
||||
const WORKUNIT* wu
|
||||
) {
|
||||
for (unsigned int i=0; i<classes.size(); i++) {
|
||||
if (!strcmp(classes[i].name, plan_class)) {
|
||||
|
@ -996,7 +997,9 @@ bool PLAN_CLASS_SPECS::check(
|
|||
return false;
|
||||
}
|
||||
|
||||
bool PLAN_CLASS_SPECS::wu_is_infeasible(char* plan_class_name, const WORKUNIT* wu) {
|
||||
bool PLAN_CLASS_SPECS::wu_is_infeasible(
|
||||
char* plan_class_name, const WORKUNIT* wu
|
||||
) {
|
||||
if(wu_restricted_plan_class) {
|
||||
for (unsigned int i=0; i<classes.size(); i++) {
|
||||
if(!strcmp(classes[i].name, plan_class_name)) {
|
||||
|
|
Loading…
Reference in New Issue