mirror of https://github.com/BOINC/boinc.git
fix compile warnings
svn path=/trunk/boinc/; revision=7266
This commit is contained in:
parent
6c08169cc4
commit
c487a35959
|
@ -10340,3 +10340,16 @@ Rom 11 Aug 2005
|
|||
wizprogress3.ico (Added)
|
||||
wizprogress4.ico (Added)
|
||||
wizquestion.bmp (Removed)
|
||||
|
||||
David 11 Aug 2005
|
||||
- remove Unix compile warnings
|
||||
|
||||
client/
|
||||
acct_setup.h
|
||||
gui_http.h
|
||||
lib/
|
||||
crypt.C,h
|
||||
crypt_prog.C
|
||||
sched/
|
||||
file_deleter.C
|
||||
make_work.C
|
||||
|
|
|
@ -36,6 +36,7 @@ struct GET_PROJECT_CONFIG_OP: public GUI_HTTP_OP {
|
|||
std::string reply;
|
||||
int error_num;
|
||||
|
||||
virtual ~GET_PROJECT_CONFIG_OP(){}
|
||||
int do_rpc(string url);
|
||||
virtual void handle_reply(int http_op_retval);
|
||||
GET_PROJECT_CONFIG_OP(){error_num = BOINC_SUCCESS;}
|
||||
|
@ -45,6 +46,7 @@ struct LOOKUP_ACCOUNT_OP: public GUI_HTTP_OP {
|
|||
std::string reply;
|
||||
int error_num;
|
||||
|
||||
virtual ~LOOKUP_ACCOUNT_OP(){}
|
||||
int do_rpc(ACCOUNT_IN&);
|
||||
virtual void handle_reply(int http_op_retval);
|
||||
LOOKUP_ACCOUNT_OP(){error_num = BOINC_SUCCESS;}
|
||||
|
@ -54,6 +56,7 @@ struct CREATE_ACCOUNT_OP: public GUI_HTTP_OP {
|
|||
std::string reply;
|
||||
int error_num;
|
||||
|
||||
virtual ~CREATE_ACCOUNT_OP(){}
|
||||
int do_rpc(ACCOUNT_IN&);
|
||||
virtual void handle_reply(int http_op_retval);
|
||||
CREATE_ACCOUNT_OP(){error_num = BOINC_SUCCESS;}
|
||||
|
@ -62,6 +65,7 @@ struct CREATE_ACCOUNT_OP: public GUI_HTTP_OP {
|
|||
struct LOOKUP_WEBSITE_OP: public GUI_HTTP_OP {
|
||||
int error_num;
|
||||
|
||||
virtual ~LOOKUP_WEBSITE_OP(){}
|
||||
int do_rpc(std::string&);
|
||||
virtual void handle_reply(int http_op_retval);
|
||||
LOOKUP_WEBSITE_OP(){error_num = BOINC_SUCCESS;}
|
||||
|
|
|
@ -35,9 +35,9 @@ using std::string;
|
|||
// base class for various types of ops
|
||||
//
|
||||
struct GUI_HTTP_OP {
|
||||
virtual void handle_reply(int http_op_retval) {}
|
||||
virtual void handle_reply(int) {}
|
||||
GUI_HTTP_OP(){}
|
||||
~GUI_HTTP_OP(){}
|
||||
virtual ~GUI_HTTP_OP(){}
|
||||
};
|
||||
|
||||
#define GUI_HTTP_STATE_IDLE 0
|
||||
|
|
13
lib/crypt.C
13
lib/crypt.C
|
@ -210,10 +210,7 @@ int sscan_key_hex(const char* buf, KEY* key, int size) {
|
|||
// The output buffer must be at least MIN_OUT_BUFFER_SIZE.
|
||||
// The output block must be decrypted in its entirety.
|
||||
//
|
||||
int encrypt_private(
|
||||
R_RSA_PRIVATE_KEY& key, DATA_BLOCK& in, DATA_BLOCK& out,
|
||||
int& nbytes_encrypted
|
||||
) {
|
||||
int encrypt_private(R_RSA_PRIVATE_KEY& key, DATA_BLOCK& in, DATA_BLOCK& out) {
|
||||
int n, modulus_len;
|
||||
|
||||
modulus_len = (key.bits+7)/8;
|
||||
|
@ -254,26 +251,26 @@ int sign_file(const char* path, R_RSA_PRIVATE_KEY& key, DATA_BLOCK& signature) {
|
|||
char md5_buf[MD5_LEN];
|
||||
double file_length;
|
||||
DATA_BLOCK in_block;
|
||||
int retval, n;
|
||||
int retval;
|
||||
|
||||
retval = md5_file(path, md5_buf, file_length);
|
||||
if (retval) return retval;
|
||||
in_block.data = (unsigned char*)md5_buf;
|
||||
in_block.len = strlen(md5_buf);
|
||||
retval = encrypt_private(key, in_block, signature, n);
|
||||
retval = encrypt_private(key, in_block, signature);
|
||||
if (retval) return retval;
|
||||
return 0;
|
||||
}
|
||||
|
||||
int sign_block(DATA_BLOCK& data_block, R_RSA_PRIVATE_KEY& key, DATA_BLOCK& signature) {
|
||||
char md5_buf[MD5_LEN];
|
||||
int retval, n;
|
||||
int retval;
|
||||
DATA_BLOCK in_block;
|
||||
|
||||
md5_block(data_block.data, data_block.len, md5_buf);
|
||||
in_block.data = (unsigned char*)md5_buf;
|
||||
in_block.len = strlen(md5_buf);
|
||||
retval = encrypt_private(key, in_block, signature, n);
|
||||
retval = encrypt_private(key, in_block, signature);
|
||||
if (retval) {
|
||||
printf("sign_block: encrypt_private returned %d\n", retval);
|
||||
return retval;
|
||||
|
|
|
@ -101,9 +101,7 @@ int print_key_hex(FILE*, KEY* key, int len);
|
|||
int scan_key_hex(FILE*, KEY* key, int len);
|
||||
int sscan_key_hex(const char*, KEY* key, int len);
|
||||
|
||||
int encrypt_private(
|
||||
R_RSA_PRIVATE_KEY& key, DATA_BLOCK& in, DATA_BLOCK& out, int&
|
||||
);
|
||||
int encrypt_private(R_RSA_PRIVATE_KEY& key, DATA_BLOCK& in, DATA_BLOCK& out);
|
||||
int decrypt_public(R_RSA_PUBLIC_KEY& key, DATA_BLOCK& in, DATA_BLOCK& out);
|
||||
int sign_file(const char* path, R_RSA_PRIVATE_KEY&, DATA_BLOCK& signature);
|
||||
int sign_block(DATA_BLOCK& data, R_RSA_PRIVATE_KEY&, DATA_BLOCK& signature);
|
||||
|
|
|
@ -172,7 +172,7 @@ int main(int argc, char** argv) {
|
|||
in.data = buf2;
|
||||
in.len = strlen((char*)in.data);
|
||||
out.data = buf;
|
||||
encrypt_private(private_key, in, out, n);
|
||||
encrypt_private(private_key, in, out);
|
||||
in = out;
|
||||
out.data = buf2;
|
||||
decrypt_public(public_key, in, out);
|
||||
|
|
|
@ -310,7 +310,7 @@ int delete_antique_files() {
|
|||
char *fname_at_end=NULL;
|
||||
int nchars=strlen(single_line);
|
||||
struct stat statbuf;
|
||||
char *err=NULL;
|
||||
const char *err=NULL;
|
||||
|
||||
// We can interrupt this at any point.
|
||||
// pclose() is called when process exits.
|
||||
|
|
|
@ -119,7 +119,7 @@ void make_new_wu(
|
|||
SCHED_CONFIG& config
|
||||
) {
|
||||
char file_name[256], buf[LARGE_BLOB_SIZE], pathname[256];
|
||||
char new_file_name[256], new_pathname[256], command[256];
|
||||
char new_file_name[256], new_pathname[256];
|
||||
char new_buf[LARGE_BLOB_SIZE];
|
||||
char * p;
|
||||
int retval;
|
||||
|
@ -145,11 +145,6 @@ void make_new_wu(
|
|||
new_pathname, true
|
||||
);
|
||||
retval = link(pathname, new_pathname);
|
||||
#if 0
|
||||
sprintf(command,"ln %s %s", pathname, new_pathname);
|
||||
log_messages.printf(SCHED_MSG_LOG::DEBUG, "executing command: %s\n", command);
|
||||
retval = system(command);
|
||||
#endif
|
||||
if (retval) {
|
||||
log_messages.printf(
|
||||
SCHED_MSG_LOG::CRITICAL, "link() error %d\n", retval
|
||||
|
|
Loading…
Reference in New Issue