From fced9b663d29c8c2860c78a3b85ccb14f4c9d32d Mon Sep 17 00:00:00 2001 From: David Anderson Date: Thu, 26 Jun 2008 19:27:23 +0000 Subject: [PATCH] - fix gcc warnings svn path=/trunk/boinc/; revision=15493 --- checkin_notes | 6 ++++++ lib/coproc.C | 8 ++++---- lib/coproc.h | 8 ++++---- 3 files changed, 14 insertions(+), 8 deletions(-) diff --git a/checkin_notes b/checkin_notes index f8a2251efd..c0de14e601 100644 --- a/checkin_notes +++ b/checkin_notes @@ -5170,3 +5170,9 @@ David 26 June 2008 client/ hostinfo_unix.C + +David 26 June 2008 + - fix gcc warnings + + lib/ + coproc.C,h diff --git a/lib/coproc.C b/lib/coproc.C index a47be07db5..104cac9543 100644 --- a/lib/coproc.C +++ b/lib/coproc.C @@ -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; } diff --git a/lib/coproc.h b/lib/coproc.h index c8d8e5dd5d..480e197bf0 100644 --- a/lib/coproc.h +++ b/lib/coproc.h @@ -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(){} };