_const_warning_reduction
authorDebian BOINC Maintainers <pkg-boinc-devel@lists.alioth.debian.org>
Wed, 15 Mar 2017 15:29:18 +0000 (15:29 +0000)
committerGianfranco Costamagna <locutusofborg@debian.org>
Wed, 15 Mar 2017 15:29:18 +0000 (15:29 +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 062a2c4e97642495bd77a81350cc44adf433ced5..8872997db4b19b50de30b3eea9fdda5ffbc818fc 100644 (file)
@@ -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 */
index 640e4bb51ce2397545e7e9c5b512715194fe3508..695c06f0f8abb7f1a80ee34c256235ce650e3eda 100644 (file)
@@ -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) {
index c21ffaec86a2c8b2f751dc16df028af790440323..ae67081d513c998feb602fde457b226f3d6272d8 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 0b106be6db3145b6bd4d9a4ceba044817f306b7f..f86d7e72af307706a610f5953e5e533d086a9cf3 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"),