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

James E. King, III reopened THRIFT-3067:
----------------------------------------
      Assignee: James E. King, III

Working to get this assigned to [~arijitnit06].

> C++ cppcheck performance related warnings
> -----------------------------------------
>
>                 Key: THRIFT-3067
>                 URL: https://issues.apache.org/jira/browse/THRIFT-3067
>             Project: Thrift
>          Issue Type: Bug
>          Components: C++ - Library
>    Affects Versions: 0.9.2
>            Reporter: James E. King, III
>            Assignee: James E. King, III
>            Priority: Trivial
>             Fix For: 0.9.3
>
>
> These are performance-related issues identified by cppcheck that could be 
> cleaned up.  Since these are not logic errors per se, I have marked them as 
> trivial:
> {noformat}grep 'performance' /tmp/cppcheck-thrift.issues
> [compiler/cpp/src/parse/t_enum.h:47]: (performance) Function parameter 'name' 
> should be passed by reference.
> [compiler/cpp/src/parse/t_program.h:72]: (performance) Variable 'name_' is 
> assigned in constructor body. Consider performing initialization in 
> initialization list.
> [compiler/cpp/src/parse/t_service.h:48]: (performance) Prefer prefix ++/-- 
> operators for non-primitive types.
> [contrib/fb303/TClientInfo.cpp:157] -> [contrib/fb303/TClientInfo.cpp:159]: 
> (performance) Variable 'secs' is reassigned a value before the old one has 
> been used.
> [contrib/fb303/cpp/FacebookBase.cpp:101]: (performance) Prefer prefix ++/-- 
> operators for non-primitive types.
> [contrib/fb303/cpp/ServiceTracker.cpp:254]: (performance) Prefer prefix ++/-- 
> operators for non-primitive types.
> [lib/cpp/src/thrift/concurrency/ThreadManager.cpp:354]: (performance) Prefer 
> prefix ++/-- operators for non-primitive types.
> [lib/cpp/src/thrift/concurrency/ThreadManager.cpp:448]: (performance) Prefer 
> prefix ++/-- operators for non-primitive types.
> [lib/cpp/src/thrift/concurrency/TimerManager.cpp:122]: (performance) Prefer 
> prefix ++/-- operators for non-primitive types.{noformat}
> I also noticed that the TSocket constructor that takes a string argument does 
> so by value instead of by reference.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to