maskit opened a new issue, #10428:
URL: https://github.com/apache/trafficserver/issues/10428

   rpc/RPCClient.h
   ```
    52  std::string
    53  invoke(std::string_view req)
    54  {
    55    std::string text; // for error messages.
    56    std::unique_ptr<char[]> buf(new char[BUFFER_SIZE]);
    57    swoc::FixedBufferWriter bw{buf.get(), BUFFER_SIZE};
    58    try {
    59      _client.connect();
    60      if (!_client.is_closed()) {
    61        _client.send(req);
    62        switch (_client.read_all(bw)) {
    63        case IPCSocketClient::ReadStatus::NO_ERROR: {
    64          _client.disconnect();
    65          return {bw.data(), bw.size()};
    66        }
    67        case IPCSocketClient::ReadStatus::BUFFER_FULL: {
    68          throw std::runtime_error(
    69            swoc::bwprint(text, "Buffer full, not enough space to read 
the response. Buffer size: {}", BUFFER_SIZE));
    70        } break;
    71        default:
    72          throw std::runtime_error("Something happened, we can't read the 
response");
    73          break;
    74        }
    75      } else {
    76        throw std::runtime_error(swoc::bwprint(text, "Node seems not 
available: {}", std ::strerror(errno)));
    77      }
    78    } catch (std::exception const &ex) {
    79      _client.disconnect();
    80      throw std::runtime_error(swoc::bwprint(text, "RPC Node Error: {}", 
ex.what()));
    81    }
    82
        
   CID 1508880 (#1 of 1): Structurally dead code (UNREACHABLE)
   unreachable: This code cannot be reached: return std::__cxx11::string();.
    83    return {};
    84  }
   ```


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

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to