On 03/05/2018 09:53 AM, Thomas Huth wrote:
On 05.03.2018 12:22, Christian Borntraeger wrote:
Adding qemu-s390x.

On 03/05/2018 11:31 AM, dcb wrote:
Public bug reported:

qemu/pc-bios/s390-ccw/libc.c:82]: (style) Unsigned variable 'num_idx'
can't be negative so it is unnecessary to test it.

Source code is


     while (num_idx >= 0) {

but

     size_t num_idx = 1; /* account for NUL */

So there is no escape from the while loop.
Actually we're defining size_t like this in the s390-ccw bios:

typedef long               size_t;

So the while loop is not endless.

But yes, this is ugly, we should fix the function and re-define size_t
to be unsigned instead...

  Thomas

Agreed.

--
- Collin L Walling


Reply via email to