From 9fc6007a2cf94ffa1442236263ea3ea70420f104 Mon Sep 17 00:00:00 2001 From: Debian BOINC Maintainers Date: Fri, 22 Jul 2016 03:04:55 +0000 Subject: [PATCH] _const_warning_reduction Gbp-Pq: Name 213_const_warning_reduction.patch --- client/main.cpp | 2 +- client/s_util.cpp | 4 ++-- client/s_util.h | 2 +- client/seti_header.cpp | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) 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"), -- 2.30.2