You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafficserver.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2016/10/27 00:20:58 UTC

[jira] [Work logged] (TS-5012) CID 1267812 Logically Dead Code

     [ https://issues.apache.org/jira/browse/TS-5012?focusedWorklogId=31203&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-31203 ]

ASF GitHub Bot logged work on TS-5012:
--------------------------------------

                Author: ASF GitHub Bot
            Created on: 27/Oct/16 00:20
            Start Date: 27/Oct/16 00:20
    Worklog Time Spent: 10m 
      Work Description: GitHub user ngara opened a pull request:

    https://github.com/apache/trafficserver/pull/1155

    TS-5012 CID 1267812 Logically Dead Code fixed

    removed ink_asserts in favor of ink_abort with an error message

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/ngara/trafficserver TS-5012

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/trafficserver/pull/1155.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #1155
    
----
commit c89bd698064d9cb7a217f5d6707121665d76d309
Author: Nathan Garabedian <ng...@users.noreply.github.com>
Date:   2016-10-26T23:54:32Z

    TS-5012 CID 1267812 Logically Dead Code fixed

----


Issue Time Tracking
-------------------

            Worklog Id:     (was: 31203)
            Time Spent: 10m
    Remaining Estimate: 0h

> CID 1267812 Logically Dead Code
> -------------------------------
>
>                 Key: TS-5012
>                 URL: https://issues.apache.org/jira/browse/TS-5012
>             Project: Traffic Server
>          Issue Type: Bug
>          Components: Manager
>            Reporter: Nathan Garabedian
>            Assignee: Nathan Garabedian
>              Labels: coverity
>             Fix For: 7.1.0
>
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> 8void
> 189ConfigProcessor::release(unsigned int id, ConfigInfo *info)
> 190{
> 191  int idx;
> 192
>    	cond_at_least: Condition id != 0U, taking true branch. Now the value of id is at least 1.
>    	cond_cannot_single: Condition id != 0U, taking true branch. Now the value of id cannot be equal to 0.
> 193  ink_assert(id != 0);
>    	cond_between: Condition id <= 100U, taking true branch. Now the value of id is between 1 and 100.
> 194  ink_assert(id <= MAX_CONFIGS);
> 195
>    	between: At condition id == 0U, the value of id must be between 1 and 100.
>    	cannot_single: At condition id == 0U, the value of id cannot be equal to 0.
>    	dead_error_condition: The condition id == 0U cannot be true.
>    	cond_between: Condition id == 0U, taking false branch. Now the value of id is between 1 and 100.
>    	between: At condition id > 100U, the value of id must be between 1 and 100.
>    	cannot_single: At condition id > 100U, the value of id cannot be equal to 0.
>    	dead_error_condition: The condition id > 100U cannot be true.
> 196  if (id == 0 || id > MAX_CONFIGS) {
> 197    // nothing to delete since we have an invalid index
>    	
> CID 1267812 (#1 of 1): Logically dead code (DEADCODE)
> dead_error_line: Execution cannot reach this statement: return;.
> 198    return;
> 199  }
> 200



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)