statement not reached

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • rbalakrishnan
    New Member
    • Mar 2008
    • 3

    statement not reached

    Hi All

    i am working to fix all warning messages in my c code.
    i am getting "statement not reached" warning.How can i resolve it? please give me some tips to resolve this warning.

    Thanks in advance.
  • weaknessforcats
    Recognized Expert Expert
    • Mar 2007
    • 9214

    #2
    You have code that is not logically reachable. LIke this:

    [code=cpp]
    if ( a == 2)
    {
    //etc...
    return;
    }
    else
    {
    //etc...
    return;
    }
    //etc... //not reachable
    return;
    [/code]

    You will simplyhave ot look where the compiler says there is unreachable code and see why there is no way to get there.

    Comment

    • rbalakrishnan
      New Member
      • Mar 2008
      • 3

      #3
      Thanks for the great help. i'll look in to my code to resolve the problem.

      Comment

      Working...