_const_warning_reduction
authorDebian BOINC Maintainers <pkg-boinc-devel@lists.alioth.debian.org>
Tue, 30 Sep 2014 12:49:40 +0000 (12:49 +0000)
committerGianfranco Costamagna <costamagnagianfranco@yahoo.it>
Tue, 30 Sep 2014 12:49:40 +0000 (12:49 +0000)
Gbp-Pq: Name 213_const_warning_reduction.patch

client/main.cpp
client/s_util.cpp
client/s_util.h
client/seti_header.cpp

index ed1b8b088abdb31f2aa566530de75ea22fa93e16..ce353fa5dba515a41f09da7d3b88389365447283 100644 (file)
@@ -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 */
index c874e46dc2c71b19a09e4581b0dd0e4b55f48a83..e729d54d35246886eba3b4c2122ac931dbb5c31a 100644 (file)
@@ -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) {
index 5e01665f002aa398e2da45278f45ad0d25443a63..d904cf61d2f0b36c873cde5c5445be0f4a34aa21 100644 (file)
@@ -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
index 56afbc429369314a988325e3213b2012852e8a69..598bf4652e358f3babb68d4f2a3245a86d4861a1 100644 (file)
@@ -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>("SETI_WU_INFO"),