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 2021/09/11 12:32:02 UTC

[jira] [Closed] (THRIFT-5341) Fix Old-Style-Cast, Missing override and Possible noexcept

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

Jens Geyer closed THRIFT-5341.
------------------------------

> Fix Old-Style-Cast, Missing override and Possible noexcept
> ----------------------------------------------------------
>
>                 Key: THRIFT-5341
>                 URL: https://issues.apache.org/jira/browse/THRIFT-5341
>             Project: Thrift
>          Issue Type: Improvement
>          Components: C++ - Compiler
>            Reporter: Kashirin Alex
>            Assignee: Kashirin Alex
>            Priority: Major
>             Fix For: 0.15.0
>
>          Time Spent: 2h 50m
>  Remaining Estimate: 0h
>
>  
> The fixes required are over the warnings reported with a C++ complier (GCC in this case) compiling with the flags -Wsuggest-override and -Wold-style-cast
>  
> The GCC built  warnings for both of the flags are as follow:
>  
> {code:java}
> swc-db/src/cc/include/swcdb/thrift/gen-cpp/Service_types.cpp:3461:42: warning: use of old-style cast to ‘int32_t’ {aka ‘int’} [-Wold-style-cast]
>  3461 | xfer += oprot->writeI32((int32_t)this->comp);
>  | ^~~~
>  | -------------------
>  | static_cast<int32_t> (this->comp) 
>  
> swc-db/src/cc/include/swcdb/thrift/gen-cpp/Service_types.h:352:56: warning: use of old-style cast to ‘enum SWC::Thrift::KeySeq::type’ [-Wold-style-cast] 352 | Schema() : cid(0), col_name(), col_seq((KeySeq::type)0),
> | ^ | - | static_cast< -- | > (0)
>  
> swc-db/src/cc/include/swcdb/thrift/gen-cpp/Service_types.h:319:15: warning: ‘virtual const char* SWC::Thrift::Exception::what() const’ can be marked override [-Wsuggest-overr$ 319 | const char* what() const noexcept;
> swc-db/src/cc/include/swcdb/thrift/gen-cpp/Service_types.h:591:12: warning: ‘virtual uint32_t SWC::Thrift::SpecSchemas::write(apache::thrift::protocol::TProtocol*) const’ can$ 591 | uint32_t write(::apache::thrift::protocol::TProtocol* oprot) const;
>  
> swc-db/src/cc/include/swcdb/thrift/gen-cpp/Service.h:274:8: warning: ‘virtual void SWC::Thrift::ServiceNull::scan(SWC::Thrift::Cells&, const SWC::Thrift::SpecScan&)’ can be marked override [-Wsuggest-override] 274 | void scan(Cells& /* _return */, const SpecScan& /* spec */) { | ^~~~
> {code}
>  
>  
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)