- fix gcc warnings

svn path=/trunk/boinc/; revision=15493
This commit is contained in:
David Anderson 2008-06-26 19:27:23 +00:00
parent 2bee18c937
commit fced9b663d
3 changed files with 14 additions and 8 deletions

View File

@ -5170,3 +5170,9 @@ David 26 June 2008
client/
hostinfo_unix.C
David 26 June 2008
- fix gcc warnings
lib/
coproc.C,h

View File

@ -63,8 +63,8 @@ int COPROC::parse(MIOFILE& fin) {
return ERR_XML_PARSE;
}
char* COPROCS::get() {
char* p = COPROC_CUDA::get(*this);
const char* COPROCS::get() {
const char* p = COPROC_CUDA::get(*this);
if (p) return p;
COPROC_CELL_SPE::get(*this);
return NULL;
@ -96,7 +96,7 @@ COPROC* COPROCS::lookup(char* type) {
return NULL;
}
char* COPROC_CUDA::get(COPROCS& coprocs) {
const char* COPROC_CUDA::get(COPROCS& coprocs) {
int count;
#ifdef _WIN32
@ -298,6 +298,6 @@ int COPROC_CUDA::parse(FILE* fin) {
return ERR_XML_PARSE;
}
char* COPROC_CELL_SPE::get(COPROCS&) {
const char* COPROC_CELL_SPE::get(COPROCS&) {
return NULL;
}

View File

@ -37,7 +37,7 @@ struct COPROC {
#ifndef _USING_FCGI_
virtual void write_xml(MIOFILE&);
#endif
COPROC(char* t){
COPROC(const char* t){
strcpy(type, t);
count = 0;
used = 0;
@ -64,7 +64,7 @@ struct COPROCS {
}
}
#endif
char* get();
const char* get();
int parse(FILE*);
COPROC* lookup(char*);
bool sufficient_coprocs(COPROCS&, bool verbose);
@ -107,14 +107,14 @@ struct COPROC_CUDA : public COPROC {
#endif
COPROC_CUDA(): COPROC("CUDA"){}
virtual ~COPROC_CUDA(){}
static char* get(COPROCS&);
static const char* get(COPROCS&);
void clear();
int parse(FILE*);
};
struct COPROC_CELL_SPE : public COPROC {
static char* get(COPROCS&);
static const char* get(COPROCS&);
COPROC_CELL_SPE() : COPROC("Cell SPE"){}
virtual ~COPROC_CELL_SPE(){}
};