You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@trafficserver.apache.org by GitBox <gi...@apache.org> on 2021/05/13 01:18:52 UTC

[GitHub] [trafficserver] maskit opened a new pull request #7830: Fix a format specifier for size_t

maskit opened a new pull request #7830:
URL: https://github.com/apache/trafficserver/pull/7830


   ```
   HttpSessionManager.cc:150:79: error: format specifies type 'long long' but the argument has type 'size_t' (aka 'unsigned long') [-Werror,-Wformat]
       Debug("http_ss", "Search for host name only not IP.  Pool size %" PRId64, m_fqdn_pool.count());
       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
   ../../include/tscore/Diags.h:330:39: note: expanded from macro 'Debug'
         diags->log(tag, DL_Debug, &loc, __VA_ARGS__);    \
                                         ^~~~~~~~~~~
   ```


-- 
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.

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



[GitHub] [trafficserver] maskit merged pull request #7830: Fix a format specifier for size_t

Posted by GitBox <gi...@apache.org>.
maskit merged pull request #7830:
URL: https://github.com/apache/trafficserver/pull/7830


   


-- 
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.

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



[GitHub] [trafficserver] zwoop commented on pull request #7830: Fix a format specifier for size_t

Posted by GitBox <gi...@apache.org>.
zwoop commented on pull request #7830:
URL: https://github.com/apache/trafficserver/pull/7830#issuecomment-842478845


   Cherry-picked to v9.1.x branch.


-- 
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.

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



[GitHub] [trafficserver] zwoop commented on pull request #7830: Fix a format specifier for size_t

Posted by GitBox <gi...@apache.org>.
zwoop commented on pull request #7830:
URL: https://github.com/apache/trafficserver/pull/7830#issuecomment-842478845


   Cherry-picked to v9.1.x branch.


-- 
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.

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



[GitHub] [trafficserver] SolidWallOfCode commented on a change in pull request #7830: Fix a format specifier for size_t

Posted by GitBox <gi...@apache.org>.
SolidWallOfCode commented on a change in pull request #7830:
URL: https://github.com/apache/trafficserver/pull/7830#discussion_r631526271



##########
File path: proxy/http/HttpSessionManager.cc
##########
@@ -147,7 +147,7 @@ ServerSessionPool::acquireSession(sockaddr const *addr, CryptoHash const &hostna
   to_return        = nullptr;
 
   if ((TS_SERVER_SESSION_SHARING_MATCH_MASK_HOSTONLY & match_style) && !(TS_SERVER_SESSION_SHARING_MATCH_MASK_IP & match_style)) {
-    Debug("http_ss", "Search for host name only not IP.  Pool size %" PRId64, m_fqdn_pool.count());
+    Debug("http_ss", "Search for host name only not IP.  Pool size %zu", m_fqdn_pool.count());

Review comment:
       Should the change be to "PRIu64'? Codes such as "zu" aren't portable.




-- 
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.

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



[GitHub] [trafficserver] maskit commented on a change in pull request #7830: Fix a format specifier for size_t

Posted by GitBox <gi...@apache.org>.
maskit commented on a change in pull request #7830:
URL: https://github.com/apache/trafficserver/pull/7830#discussion_r631561831



##########
File path: proxy/http/HttpSessionManager.cc
##########
@@ -147,7 +147,7 @@ ServerSessionPool::acquireSession(sockaddr const *addr, CryptoHash const &hostna
   to_return        = nullptr;
 
   if ((TS_SERVER_SESSION_SHARING_MATCH_MASK_HOSTONLY & match_style) && !(TS_SERVER_SESSION_SHARING_MATCH_MASK_IP & match_style)) {
-    Debug("http_ss", "Search for host name only not IP.  Pool size %" PRId64, m_fqdn_pool.count());
+    Debug("http_ss", "Search for host name only not IP.  Pool size %zu", m_fqdn_pool.count());

Review comment:
       No
   ```
   HttpSessionManager.cc:150:79: error: format specifies type 'unsigned long long' but the argument has type 'size_t' (aka 'unsigned long') [-Werror,-Wformat]
       Debug("http_ss", "Search for host name only not IP.  Pool size %" PRIu64, m_fqdn_pool.count());
       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
   ../../include/tscore/Diags.h:330:39: note: expanded from macro 'Debug'
         diags->log(tag, DL_Debug, &loc, __VA_ARGS__);    \
                                         ^~~~~~~~~~~
   ```




-- 
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.

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