diff --git a/sched/sample_assimilator.cpp b/sched/sample_assimilator.cpp index 02179f39d7..fc1beafbe0 100644 --- a/sched/sample_assimilator.cpp +++ b/sched/sample_assimilator.cpp @@ -45,8 +45,7 @@ int write_error(char* p) { return 0; } -int assimilate_handler_init(int argc, char** argv) { - // handle project specific arguments here +int assimilate_handler_init(int, char**) { return 0; } diff --git a/sched/sample_dummy_assimilator.cpp b/sched/sample_dummy_assimilator.cpp index c2e9a5ea49..4759b8c93d 100644 --- a/sched/sample_dummy_assimilator.cpp +++ b/sched/sample_dummy_assimilator.cpp @@ -31,8 +31,7 @@ using std::vector; using std::string; -int assimilate_handler_init(int argc, char** argv) { - // handle project specific arguments here +int assimilate_handler_init(int, char**) { return 0; } diff --git a/sched/single_job_assimilator.cpp b/sched/single_job_assimilator.cpp index 1c550a5fce..563d4518d7 100644 --- a/sched/single_job_assimilator.cpp +++ b/sched/single_job_assimilator.cpp @@ -39,8 +39,7 @@ using std::vector; using std::string; -int assimilate_handler_init(int argc, char** argv) { - // handle project specific arguments here +int assimilate_handler_init(int, char**) { return 0; } diff --git a/tools/backend_lib.cpp b/tools/backend_lib.cpp index ce76c7daa7..edee36a90f 100644 --- a/tools/backend_lib.cpp +++ b/tools/backend_lib.cpp @@ -51,6 +51,8 @@ using std::string; +// the random part of output filenames needs to be hard to guess +// static struct random_init { random_init() { srand48(getpid() + time(0)); @@ -153,14 +155,16 @@ int create_result( int priority_increase ) { DB_RESULT result; - char base_outfile_name[256]; + char base_outfile_name[MAXPATHLEN]; char result_template[BLOB_SIZE]; int retval; initialize_result(result, wu); + result.random = lrand48(); + result.priority += priority_increase; sprintf(result.name, "%s_%s", wu.name, result_name_suffix); - sprintf(base_outfile_name, "%s_", result.name); + sprintf(base_outfile_name, "%s_%ld", result.name, lrand48()); retval = read_filename( result_template_filename, result_template, sizeof(result_template) ); @@ -189,8 +193,6 @@ int create_result( } strlcpy(result.xml_doc_in, result_template, sizeof(result.xml_doc_in)); - result.random = lrand48(); - if (query_string) { result.db_print_values(query_string); } else {