From: Debian BOINC Maintainers Date: Tue, 30 Sep 2014 12:49:40 +0000 (+0000) Subject: _const_warning_reduction X-Git-Tag: archive/raspbian/8.00_svn3363-4+rpi1~1^2^2~7 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=ae225c4cc150ef445e50a69f992b334349ed4b27;p=boinc-app-seti.git _const_warning_reduction Gbp-Pq: Name 213_const_warning_reduction.patch --- diff --git a/client/main.cpp b/client/main.cpp index ed1b8b0..ce353fa 100644 --- a/client/main.cpp +++ b/client/main.cpp @@ -111,7 +111,7 @@ void usage() { } void print_error(int e) { - char* p; + const char* p; #ifdef USE_MANUAL_CALLSTACK call_stack.enter("print_error()"); #endif /* USE_MANUAL_CALLSTACK */ diff --git a/client/s_util.cpp b/client/s_util.cpp index c874e46..e729d54 100644 --- a/client/s_util.cpp +++ b/client/s_util.cpp @@ -245,11 +245,11 @@ int float_to_uchar(float float_element[], unsigned char char_element[], return 0; } -char* error_string(int e) { +const char* error_string(int e) { #ifdef USE_MANUAL_CALLSTACK call_stack.enter("error_string()"); #endif - char* p; + const char* p; static char buf[256]; switch(e) { diff --git a/client/s_util.h b/client/s_util.h index 5e01665..d904cf6 100644 --- a/client/s_util.h +++ b/client/s_util.h @@ -150,6 +150,6 @@ extern int float_to_uchar( float float_element[], unsigned char char_element[], long num_elements, float scale_factor ); -extern char* error_string(int); +extern const char* error_string(int); #endif diff --git a/client/seti_header.cpp b/client/seti_header.cpp index 56afbc4..598bf46 100644 --- a/client/seti_header.cpp +++ b/client/seti_header.cpp @@ -66,8 +66,8 @@ // Write a SETI work unit header to a file -char *receivers[]={"invalid","synthetic","ao1420"}; -char *datatypes[]={"invalid","ascii","encoded","sun_binary"}; +const char *const receivers[]={"invalid","synthetic","ao1420"}; +const char *const datatypes[]={"invalid","ascii","encoded","sun_binary"}; SETI_WU_INFO::SETI_WU_INFO(const workunit &w) : track_mem("SETI_WU_INFO"),