From: Debian BOINC Maintainers Date: Tue, 5 Jun 2018 22:03:28 +0000 (+0100) Subject: _const_warning_reduction X-Git-Tag: archive/raspbian/8.00_svn3725-3+rpi1^2~11 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=1b5bc530f313afeea1956587621dd2e69538999e;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 062a2c4..8872997 100644 --- a/client/main.cpp +++ b/client/main.cpp @@ -113,7 +113,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 640e4bb..695c06f 100644 --- a/client/s_util.cpp +++ b/client/s_util.cpp @@ -283,11 +283,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 c21ffae..ae67081 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 0b106be..f86d7e7 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"),