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.
|
// Support for plan classes defined using an XML file.
|
||||||
// See https://boinc.berkeley.edu/trac/wiki/AppPlanSpec
|
// 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 <cmath>
|
||||||
|
|
||||||
#include "util.h"
|
#include "util.h"
|
||||||
|
@ -32,7 +29,7 @@
|
||||||
|
|
||||||
using std::string;
|
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
|
// letting us define numerical ranges for these OS versions
|
||||||
//
|
//
|
||||||
static double os_version_num(HOST h) {
|
static double os_version_num(HOST h) {
|
||||||
|
@ -82,7 +79,9 @@ static int android_version_num(HOST h) {
|
||||||
return 0;
|
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 (pc->min_wu_id && wu->id < pc->min_wu_id) {
|
||||||
if (config.debug_version_select) {
|
if (config.debug_version_select) {
|
||||||
log_messages.printf(MSG_NORMAL,
|
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 (pc->min_batch && wu->batch < pc->min_batch) {
|
||||||
if (config.debug_version_select) {
|
if (config.debug_version_select) {
|
||||||
log_messages.printf(MSG_NORMAL,
|
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
|
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 (pc->max_batch && wu->batch > pc->max_batch) {
|
||||||
if (config.debug_version_select) {
|
if (config.debug_version_select) {
|
||||||
log_messages.printf(MSG_NORMAL,
|
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
|
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.
|
// See whether the given host/user can be sent this plan class.
|
||||||
// If so return the resource usage and estimated FLOPS in hu.
|
// 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;
|
COPROC* cpp = NULL;
|
||||||
bool can_use_multicore = true;
|
bool can_use_multicore = true;
|
||||||
string msg;
|
string msg;
|
||||||
|
@ -981,11 +982,11 @@ bool PLAN_CLASS_SPEC::check(SCHEDULER_REQUEST& sreq, HOST_USAGE& hu, const WORKU
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool PLAN_CLASS_SPECS::check(
|
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++) {
|
for (unsigned int i=0; i<classes.size(); i++) {
|
||||||
if (!strcmp(classes[i].name, plan_class)) {
|
if (!strcmp(classes[i].name, plan_class)) {
|
||||||
|
@ -996,7 +997,9 @@ bool PLAN_CLASS_SPECS::check(
|
||||||
return false;
|
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) {
|
if(wu_restricted_plan_class) {
|
||||||
for (unsigned int i=0; i<classes.size(); i++) {
|
for (unsigned int i=0; i<classes.size(); i++) {
|
||||||
if(!strcmp(classes[i].name, plan_class_name)) {
|
if(!strcmp(classes[i].name, plan_class_name)) {
|
||||||
|
|
Loading…
Reference in New Issue