Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unreachable code in g2_addfield.c #176

Closed
edwardhartnett opened this issue Nov 2, 2021 · 1 comment
Closed

unreachable code in g2_addfield.c #176

edwardhartnett opened this issue Nov 2, 2021 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@edwardhartnett
Copy link
Contributor

In g2_addfield.c we have this code:

    else
    {
        printf("g2_addfield: Data Representation Template 5.%ld not yet implemented.\n", idrsnum);
        ierr = -7;
        return ierr;
    }

But this code can never be reached, because if the drsnum is wrong, we already discovered that and returned a -5.

@edwardhartnett edwardhartnett added the enhancement New feature or request label Nov 2, 2021
@edwardhartnett edwardhartnett self-assigned this Nov 2, 2021
@edwardhartnett
Copy link
Contributor Author

OK, this can't be reached but that's OK in this case. This is the equivalent of a default in a case statement that cannot be reached.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant