From 2b9ddab14cf8bc64e50e3f2cf2334b9503b60866 Mon Sep 17 00:00:00 2001 From: David Reiss Date: Wed, 17 Oct 2007 03:39:55 +0000 Subject: [PATCH] Thrift: Kill a warning. Summary: These should always have been const. Reviewed By: mcslee Test Plan: Re-ran the dense protocol test. Revert Plan: ok git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665303 13f79535-47bb-0310-9956-ffa450edef68 --- compiler/cpp/src/generate/t_cpp_generator.cc | 4 ++-- lib/cpp/src/TReflectionLocal.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/compiler/cpp/src/generate/t_cpp_generator.cc b/compiler/cpp/src/generate/t_cpp_generator.cc index a92be52f..d5f2baf8 100644 --- a/compiler/cpp/src/generate/t_cpp_generator.cc +++ b/compiler/cpp/src/generate/t_cpp_generator.cc @@ -574,10 +574,10 @@ void t_cpp_generator::generate_struct_fingerprint(ofstream& out, if (tstruct->has_fingerprint()) { out << - indent() << stat << "char* " << nspace + indent() << stat << "const char* " << nspace << "ascii_fingerprint" << comment << "= \"" << tstruct->get_ascii_fingerprint() << "\";" << endl << - indent() << stat << "uint8_t " << nspace << + indent() << stat << "const uint8_t " << nspace << "binary_fingerprint[" << t_type::fingerprint_len << "]" << comment << "= {"; char* comma = ""; for (int i = 0; i < t_type::fingerprint_len; i++) { diff --git a/lib/cpp/src/TReflectionLocal.h b/lib/cpp/src/TReflectionLocal.h index 3fe7c634..8e391170 100644 --- a/lib/cpp/src/TReflectionLocal.h +++ b/lib/cpp/src/TReflectionLocal.h @@ -59,7 +59,7 @@ struct TypeSpec { } TypeSpec(TType ttype, - uint8_t* fingerprint, + const uint8_t* fingerprint, FieldMeta* metas, TypeSpec** specs) : ttype(ttype) -- 2.17.1