You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafficserver.apache.org by "maskit (via GitHub)" <gi...@apache.org> on 2023/08/16 21:15:51 UTC

[GitHub] [trafficserver] maskit opened a new issue, #10215: CID 1512901: Logically dead code

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

   ```
   161    // additional condition for client
   162    if (towrite == 0) {
   163      break;
   164    }
   165
      	cond_const: Condition empty_input == 0, taking true branch. Now the value of empty_input is equal to 0.
      	const: At condition empty_input == 0, the value of empty_input must be equal to 0.
      	dead_error_condition: The condition empty_input == 0 must be true.
   166    if (empty_input == 0) {
   167      blk   = TSIOBufferReaderStart(transform_ctx->reserved.reader);
   168      start = TSIOBufferBlockReadStart(blk, transform_ctx->reserved.reader, &blk_len);
   169
   170      lua_pushlightuserdata(L, transform_ctx);
   171      lua_rawget(L, LUA_GLOBALSINDEX); /* push function */
   172
   173      if (towrite > blk_len) {
   174        lua_pushlstring(L, start, (size_t)blk_len);
   175        towrite -= blk_len;
   176        TSIOBufferReaderConsume(transform_ctx->reserved.reader, blk_len);
   177      } else {
   178        lua_pushlstring(L, start, (size_t)towrite);
   179        TSIOBufferReaderConsume(transform_ctx->reserved.reader, towrite);
   180        towrite = 0;
   181      }
   182
   183      if (!towrite && eos) {
   184        lua_pushinteger(L, 1); /* second param, data finished */
   185      } else {
   186        lua_pushinteger(L, 0); /* second param, data not finish */
   187      }
   188    } else {
      	
   CID 1512901 (#1 of 1): Logically dead code (DEADCODE)
   dead_error_begin: Execution cannot reach this statement: lua_pushlightuserdata(L, tr....
   189      lua_pushlightuserdata(L, transform_ctx);
   190      lua_rawget(L, LUA_GLOBALSINDEX); /* push function */
   191
   192      lua_pushlstring(L, "", 0);
   193      lua_pushinteger(L, 1); /* second param, data finished */
   194    }
   ```


-- 
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: issues-unsubscribe@trafficserver.apache.org.apache.org

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


[GitHub] [trafficserver] maskit commented on issue #10215: CID 1512901: Logically dead code

Posted by "maskit (via GitHub)" <gi...@apache.org>.
maskit commented on issue #10215:
URL: https://github.com/apache/trafficserver/issues/10215#issuecomment-1707338240

   Thanks for looking into it. Coverity re-detected many defects and assigned new IDs for some reasons.


-- 
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: issues-unsubscribe@trafficserver.apache.org

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


[GitHub] [trafficserver] shukitchan closed issue #10215: CID 1512901: Logically dead code

Posted by "shukitchan (via GitHub)" <gi...@apache.org>.
shukitchan closed issue #10215: CID 1512901: Logically dead code
URL: https://github.com/apache/trafficserver/issues/10215


-- 
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: issues-unsubscribe@trafficserver.apache.org

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


[GitHub] [trafficserver] shukitchan commented on issue #10215: CID 1512901: Logically dead code

Posted by "shukitchan (via GitHub)" <gi...@apache.org>.
shukitchan commented on issue #10215:
URL: https://github.com/apache/trafficserver/issues/10215#issuecomment-1703614107

   The same as #10329 


-- 
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: issues-unsubscribe@trafficserver.apache.org

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