Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

clang tidy: issues in ZenohUTransport.cpp #99

Open
debruce opened this issue Aug 15, 2024 · 0 comments
Open

clang tidy: issues in ZenohUTransport.cpp #99

debruce opened this issue Aug 15, 2024 · 0 comments

Comments

@debruce
Copy link
Contributor

debruce commented Aug 15, 2024

  1. uError can be made static at line 28
  2. message is unused at line 28
  3. default_authority_name and sink are unused
  4. zenoh_key is not initialized
  5. invalid case style for writeUUri
  6. 'if with identical then and else branches' at lines 44, 52, 60, 79, 257, 366 (code doesn't show that condition for any of these locations)
  7. Missing user name in TODO comment at lines 109, 115
  8. rpc_callback_map_ uninitialized at line 177
  9. invalid case style for defaultUri (line 177) and configFile (line 178)
  10. configFile is unused
  11. zenoh_key, listener, payload, listener, sink_filter are unused at various places
  12. missing user name in TODO comment at lines 182, 279
  13. registerResponseListener_ (line 219), sendRequest_ (line 246), sendRespose_ (line 306), sendPublishNotification_ (line 333), registerListenerImpl (line 408), cleanupListener (line 439) can be made static
  14. payload is unused at line 247 and 306
  15. resp_callback is not initialized at line 255
  16. zenoh_key not initialized at line 365
  17. switch has 4 consecutive identical branches at line 375 (another error that isn't evident in the code)

I missed a few unused and/or uninitialized.

There are lots of cases where clang-tidy is reporting logical problems in the code that do not exist. The if-then-else branch detection inspector seems broken.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant