You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@trafficserver.apache.org by "traeak (via GitHub)" <gi...@apache.org> on 2023/07/18 12:52:31 UTC

[GitHub] [trafficserver] traeak opened a new pull request, #10055: clang-analyzer fixes for clang14

traeak opened a new pull request, #10055:
URL: https://github.com/apache/trafficserver/pull/10055

   This fixes clang-analyzer complaints from running clang 14 analyzer on rockylinux 9.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@trafficserver.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [trafficserver] traeak commented on pull request #10055: clang-analyzer fixes for clang14

Posted by "traeak (via GitHub)" <gi...@apache.org>.
traeak commented on PR #10055:
URL: https://github.com/apache/trafficserver/pull/10055#issuecomment-1642144291

   [approve ci]


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@trafficserver.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [trafficserver] traeak commented on pull request #10055: clang-analyzer fixes for clang14

Posted by "traeak (via GitHub)" <gi...@apache.org>.
traeak commented on PR #10055:
URL: https://github.com/apache/trafficserver/pull/10055#issuecomment-1642414366

   [approve ci clang-analyzer]


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@trafficserver.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [trafficserver] masaori335 commented on a diff in pull request #10055: clang-analyzer fixes for clang14

Posted by "masaori335 (via GitHub)" <gi...@apache.org>.
masaori335 commented on code in PR #10055:
URL: https://github.com/apache/trafficserver/pull/10055#discussion_r1268838507


##########
src/tscore/Layout.cc:
##########
@@ -155,7 +155,8 @@ Layout::Layout(std::string_view const _prefix)
     std::string path;
     int len;
     if (getenv("TS_ROOT") != nullptr) {
-      std::string env_path(getenv("TS_ROOT"));
+      const char *const env = getenv("TS_ROOT");
+      std::string env_path(nullptr != env ? env : "");

Review Comment:
   (just curious) This `env` can't be nullptr in this `if` block. A fails positive of clang-analyzer? or it says something else?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@trafficserver.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [trafficserver] traeak commented on pull request #10055: clang-analyzer fixes for clang14

Posted by "traeak (via GitHub)" <gi...@apache.org>.
traeak commented on PR #10055:
URL: https://github.com/apache/trafficserver/pull/10055#issuecomment-1642414660

   [approve ci autests]


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@trafficserver.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [trafficserver] traeak commented on pull request #10055: clang-analyzer fixes for clang14

Posted by "traeak (via GitHub)" <gi...@apache.org>.
traeak commented on PR #10055:
URL: https://github.com/apache/trafficserver/pull/10055#issuecomment-1642422494

   [approve ci]


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@trafficserver.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [trafficserver] masaori335 commented on a diff in pull request #10055: clang-analyzer fixes for clang14

Posted by "masaori335 (via GitHub)" <gi...@apache.org>.
masaori335 commented on code in PR #10055:
URL: https://github.com/apache/trafficserver/pull/10055#discussion_r1268838507


##########
src/tscore/Layout.cc:
##########
@@ -155,7 +155,8 @@ Layout::Layout(std::string_view const _prefix)
     std::string path;
     int len;
     if (getenv("TS_ROOT") != nullptr) {
-      std::string env_path(getenv("TS_ROOT"));
+      const char *const env = getenv("TS_ROOT");
+      std::string env_path(nullptr != env ? env : "");

Review Comment:
   (just curious) This `env` can't be nullptr in this `if` block. A fails positive of clang-analyzer? or it says something else?
   I don't have any objection to make clang-analyzer happy, though.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@trafficserver.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [trafficserver] bneradt merged pull request #10055: clang-analyzer fixes for clang14

Posted by "bneradt (via GitHub)" <gi...@apache.org>.
bneradt merged PR #10055:
URL: https://github.com/apache/trafficserver/pull/10055


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@trafficserver.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org