[Top][All Lists]

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

Re: [qemu-s390x] [Qemu-devel] [Bug 1753437] [NEW] qemu/pc-bios/s390-ccw/

From: Collin L. Walling
Subject: Re: [qemu-s390x] [Qemu-devel] [Bug 1753437] [NEW] qemu/pc-bios/s390-ccw/libc.c:82: bad test ?
Date: Mon, 5 Mar 2018 10:30:08 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0

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) {


     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...



- Collin L Walling

reply via email to

[Prev in Thread] Current Thread [Next in Thread]