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

hscmisc.c:1218:29: warning: duplicated 'if' condition [-Wduplicated-cond] #83

Open
dcb314 opened this issue Jan 30, 2019 · 0 comments
Open

Comments

@dcb314
Copy link

dcb314 commented Jan 30, 2019

Source code is

   if (inst[1] >= 0x29 && inst[1] <= 0x2C)
        addr2 = regs->GR(b2) & ADDRESS_MAXWRAP_E(regs);
    else
    if (inst[1] >= 0x29 && inst[1] <= 0x2C)
        addr2 = regs->GR(b2) & ADDRESS_MAXWRAP(regs);

Second if cannot be executed. Suggest code rework.

Fish-Git added a commit to SDL-Hercules-390/hyperion that referenced this issue Jan 30, 2019
Reported by "dcb314" in rbowler/spinhawk (https://github.com/rbowler/spinhawk) issue 83 (rbowler/spinhawk#83) "hscmisc.c:1218:29: warning: duplicated 'if' condition [-Wduplicated-cond]", the same bug which also existed in SDL Hyperion.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant