Fix unnecessary copy warnings found by Infer
Summary: Infer AL has reported valid warnings on some folly and thrift code: ``` fbcode/folly/io/async/AsyncUDPServerSocket.h:228:19: WARNING Extra Copy: Potentially unnecessary to copy var `client` at line 228, column 19. Use 'const auto&' or 'auto&' if possible. fbcode/folly/io/async/AsyncUDPServerSocket.h:230:19: WARNING Extra Copy: Potentially unnecessary to copy var `socket` at line 230, column 19. Use 'const auto&' or 'auto&' if possible. fbcode/thrift/lib/cpp/TProcessorEventHandler.h:148:15: WARNING Extra Copy: Potentially unnecessary to copy var `ew` at line 148, column 15. Use 'const auto&' or 'auto&' if possible. fbcode/thrift/lib/cpp2/server/ThriftServer.h:705:20: WARNING Extra Copy: Potentially unnecessary to copy var `sockets` at line 705, column 20. Use 'const auto&' or 'auto&' if possible. ``` As these are transitively included in many services, they are fairly prevalent/annoying warnings. Let's fix them. Reviewed By: yfeldblum Differential Revision: D14168260 fbshipit-source-id: 12e537fe5aa73e653c15c4fef01ac618e51cd4d0
Showing
Please register or sign in to comment