You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "Jens Geyer (Jira)" <ji...@apache.org> on 2022/08/25 20:28:00 UTC

[jira] [Resolved] (THRIFT-5576) fix old-style cast at const value ctor/copy and redundant copy at ctor

     [ https://issues.apache.org/jira/browse/THRIFT-5576?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jens Geyer resolved THRIFT-5576.
--------------------------------
    Fix Version/s: 0.17.0
       Resolution: Fixed

> fix old-style cast at const value ctor/copy and redundant copy at ctor
> ----------------------------------------------------------------------
>
>                 Key: THRIFT-5576
>                 URL: https://issues.apache.org/jira/browse/THRIFT-5576
>             Project: Thrift
>          Issue Type: Improvement
>          Components: C++ - Compiler
>    Affects Versions: 0.16.0
>            Reporter: Kashirin Alex
>            Assignee: Kashirin Alex
>            Priority: Major
>              Labels: easyfix
>             Fix For: 0.17.0
>
>          Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> _*The compiler warnings: of old-style cast*_
> {code:cpp}
> /root/swc-db/src/cc/include/swcdb/thrift/gen-cpp/Service_types.h: In constructor ‘SWC::Thrift::FU_LI::FU_LI()’:
> /root/swc-db/src/cc/include/swcdb/thrift/gen-cpp/Service_types.h:3397:32: warning: use of old-style cast to ‘enum SWC::Thrift::FU_LIST_OP::type’ [-Wold-style-cast]
>  3397 |           op((FU_LIST_OP::type)0),
>       |                                ^
>       |              -
>       |              static_cast<     --
>       |                               > (0)
> {code}
> _*The redundant copy at constructor*_
> {code:cpp}
>   FU_LB() noexcept
>         : ctrl(0),
>           op((FU_LIST_OP::type)0),
>           pos(0) {
>     op = (FU_LIST_OP::type)0;
>   }
>   virtual ~FU_LB() noexcept;
> {code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)