Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 07 Jan 2016 10:10:54 +0000
From:      bugzilla-noreply@freebsd.org
To:        freebsd-arm@FreeBSD.org
Subject:   [Bug 205999] usr/src/sys/arm/at91/at91_machdep.c:261: possible int / long mixup ?
Message-ID:  <bug-205999-7@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D205999

            Bug ID: 205999
           Summary: usr/src/sys/arm/at91/at91_machdep.c:261: possible int
                    / long mixup ?
           Product: Base System
           Version: 11.0-CURRENT
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: arm
          Assignee: freebsd-arm@FreeBSD.org
          Reporter: dcb314@hotmail.com

[usr/src/sys/arm/at91/at91_machdep.c:261]: (style) int result is returned as
long value. If the return value is long to avoid loss of information, then =
you
have loss of information.

Source code is

    return (1 << (cols + rows + banks + bw));

I don't know if this kind of machine is likely to be installed with
> 2Gb RAM, but maybe better code would be

    return (1L << (cols + rows + banks + bw));

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-205999-7>