NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

port-arm/53338: src/sys/arch/aarch64/aarch64/db_interface.c:150: possible 32 / 64 bit problem ?



>Number:         53338
>Category:       port-arm
>Synopsis:       src/sys/arch/aarch64/aarch64/db_interface.c:150: possible 32 / 64 bit problem ?
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    port-arm-maintainer
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Jun 03 19:00:00 +0000 2018
>Originator:     David Binderman
>Release:        cvs-20180603
>Organization:
>Environment:
>Description:
src/sys/arch/aarch64/aarch64/db_interface.c:150]: (style) int result is assigned to long variable. 

Source code is

        const uint64_t signbit = (1 << (bitwidth - 1));

If bitwith ever goes over 32 bits, then this might be
better code:

        const uint64_t signbit = (1UL << (bitwidth - 1));

>How-To-Repeat:

>Fix:



Home | Main Index | Thread Index | Old Index