Bug 81641 - sparc/math-emu/math_32.c:503: statement order wierdness ?
Summary: sparc/math-emu/math_32.c:503: statement order wierdness ?
Status: RESOLVED CODE_FIX
Alias: None
Product: Platform Specific/Hardware
Classification: Unclassified
Component: SPARC32 (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: Pete Zaitcev
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-08-04 08:44 UTC by David Binderman
Modified: 2014-08-21 18:50 UTC (History)
2 users (show)

See Also:
Kernel Version: 3.16
Tree: Mainline
Regression: No


Attachments

Description David Binderman 2014-08-04 08:44:49 UTC
[linux-3.16/arch/sparc/math-emu/math_32.c:503]: (style) Statements following return, break, continue, goto or throw will never be executed.

        case 0: fsr = *pfsr;
            if (IR == -1) IR = 2;
            /* fcc is always fcc0 */
            fsr &= ~0xc00; fsr |= (IR << 10); break;
            *pfsr = fsr;
            break;

Maybe better

        case 0: fsr = *pfsr;
            if (IR == -1) IR = 2;
            /* fcc is always fcc0 */
            fsr &= ~0xc00; fsr |= (IR << 10);
            *pfsr = fsr;
            break;
Comment 1 Andrey Utkin 2014-08-04 19:47:03 UTC
This piece of code was unchanged since 2.6.12-rc2, which was initial git commit.
However, the code is clearly weird.
Comment 2 Andrey Utkin 2014-08-04 20:51:01 UTC
Thanks, patch sent, see "[PATCH] arch/sparc/math-emu/math_32.c: drop stray break operator"

Note You need to log in before you can comment on or make changes to this bug.