From issues-return-649-archive-asf-public=cust-asf.ponee.io@avro.apache.org Tue Mar 23 17:27:08 2021 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mxout1-he-de.apache.org (mxout1-he-de.apache.org [95.216.194.37]) by mx-eu-01.ponee.io (Postfix) with ESMTPS id A35E8180679 for ; Tue, 23 Mar 2021 18:27:08 +0100 (CET) Received: from mail.apache.org (mailroute1-lw-us.apache.org [207.244.88.153]) by mxout1-he-de.apache.org (ASF Mail Server at mxout1-he-de.apache.org) with SMTP id 11201638C1 for ; Tue, 23 Mar 2021 17:27:07 +0000 (UTC) Received: (qmail 46301 invoked by uid 500); 23 Mar 2021 17:27:07 -0000 Mailing-List: contact issues-help@avro.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@avro.apache.org Delivered-To: mailing list issues@avro.apache.org Received: (qmail 46275 invoked by uid 99); 23 Mar 2021 17:27:07 -0000 Received: from ec2-52-202-80-70.compute-1.amazonaws.com (HELO gitbox.apache.org) (52.202.80.70) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 23 Mar 2021 17:27:07 +0000 From: =?utf-8?q?GitBox?= To: issues@avro.apache.org Subject: =?utf-8?q?=5BGitHub=5D_=5Bavro=5D_thiru-mg_commented_on_a_change_in_pull_req?= =?utf-8?q?uest_=231153=3A_AVRO-3051=3A_C++_Reader_and_writers_modernized?= Message-ID: <161652042736.15632.8759758002110077956.asfpy@gitbox.apache.org> Date: Tue, 23 Mar 2021 17:27:07 -0000 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit References: In-Reply-To: thiru-mg commented on a change in pull request #1153: URL: https://github.com/apache/avro/pull/1153#discussion_r599783424 ########## File path: lang/c++/impl/DataFile.cc ########## @@ -306,20 +306,20 @@ void DataFileReaderBase::init(const ValidSchema& readerSchema) static void drain(InputStream& in) { - const uint8_t *p = 0; + const uint8_t *p = nullptr; size_t n = 0; while (in.next(&p, &n)); } char hex(unsigned int x) { - return x + (x < 10 ? '0' : ('a' - 10)); + return static_cast(x + (x < 10 ? '0' : ('a' - 10))); } std::ostream& operator << (std::ostream& os, const DataFileSync& s) { - for (size_t i = 0; i < s.size(); ++i) { - os << hex(s[i] / 16) << hex(s[i] % 16) << ' '; + for (unsigned char i : s) { Review comment: You're right. Fixed -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: users@infra.apache.org