maskit commented on a change in pull request #7100:
URL: https://github.com/apache/trafficserver/pull/7100#discussion_r468286689



##########
File path: proxy/http/HttpTransactCache.cc
##########
@@ -1309,7 +1309,7 @@ 
HttpTransactCache::match_response_to_request_conditionals(HTTPHdr *request, HTTP
 
   // If-Match: must match strongly //
   if (request->presence(MIME_PRESENCE_IF_MATCH)) {
-    int raw_etags_len, comma_sep_tag_list_len;
+    int raw_etags_len, comma_sep_tag_list_len = 0;

Review comment:
       I think `raw_etags_len` is still uninitialized. I usually don't define 
multiple variables on one line to avoid this confusion.
   ```c++
   #include <iostream>
   int main() {
       int a, b = 1;
       std::cout << a << std::endl;
       std::cout << b << std::endl;
   }
   ```
   
   ```
   foo.cc:4:18: warning: variable 'a' is uninitialized when used here 
[-Wuninitialized]
       std::cout << a << std::endl;
                    ^
   foo.cc:3:10: note: initialize the variable 'a' to silence this warning
       int a, b = 1;
            ^
             = 0
   ```




----------------------------------------------------------------
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:
[email protected]


Reply via email to