NetBSD-Bugs archive

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

bin/50997: src/bin/ls/ls.c: 4 * bad % specifiers ?



>Number:         50997
>Category:       bin
>Synopsis:       src/bin/ls/ls.c: 4 * bad % specifiers ?
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Mar 24 11:40:00 +0000 2016
>Originator:     David Binderman
>Release:        cvs dated 20160324
>Organization:
>Environment:
>Description:

src/bin/ls/ls.c:634]: (warning) %llu in format string (no. 1) requires 'unsigned long long' but the argument type is 'signed long long'.

            (void)snprintf(buf, sizeof(buf), "%llu",
                (long long)howmany(maxblock, blocksize));

Suggest remove the cast, find out the return type of howmany
and use a suitable % specifier for that type.


src/bin/ls/ls.c:650]: (warning) %llu in format string (no. 1) requires 'unsigned long long' but the argument type is 'signed long long'.
src/bin/ls/ls.c:658]: (warning) %u in format string (no. 1) requires 'unsigned int' but the argument type is 'int'.
[src/bin/ls/ls.c:660]: (warning) %u in format string (no. 1) requires 'unsigned int' but the argument type is 'int'.

Duplicates.

>How-To-Repeat:

>Fix:



Home | Main Index | Thread Index | Old Index