[Bugs] [Bug 1336515] cli: compiler warning format string

bugzilla at redhat.com bugzilla at redhat.com
Fri Jul 15 09:15:38 UTC 2016


https://bugzilla.redhat.com/show_bug.cgi?id=1336515

Muthu Vigneshwaran <mvignesh at redhat.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
                 CC|                            |mvignesh at redhat.com



--- Comment #1 from Muthu Vigneshwaran <mvignesh at redhat.com> ---
Hi,

In the function, size_t index is used, which can hold any array index.
Depending on the implementation it can be unsigned char/short/int/long/long
long.

I tried the same on Fedora, and the default compiler type is:

echo | gcc -E -xc -include 'stddef.h' - | grep size_t

Output is:
typedef long unsigned int size_t

So, the correct format specifier being %lu is used and it does not throw any
warning.

I think we should close the bug as this is more compiler dependent.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
Unsubscribe from this bug https://bugzilla.redhat.com/token.cgi?t=NUhBnHiRgx&a=cc_unsubscribe


More information about the Bugs mailing list