James E. King, III created THRIFT-3067:
------------------------------------------

             Summary: 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
            Priority: Trivial


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}



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

Reply via email to