* [Qemu-devel] [Bug 1753437] [NEW] qemu/pc-bios/s390-ccw/libc.c:82: bad test ?
@ 2018-03-05 10:31 dcb
2018-03-05 11:22 ` Christian Borntraeger
` (4 more replies)
0 siblings, 5 replies; 8+ messages in thread
From: dcb @ 2018-03-05 10:31 UTC (permalink / raw)
To: qemu-devel
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.
** Affects: qemu
Importance: Undecided
Status: New
--
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1753437
Title:
qemu/pc-bios/s390-ccw/libc.c:82: bad test ?
Status in QEMU:
New
Bug description:
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.
To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1753437/+subscriptions
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Qemu-devel] [Bug 1753437] [NEW] qemu/pc-bios/s390-ccw/libc.c:82: bad test ?
2018-03-05 10:31 [Qemu-devel] [Bug 1753437] [NEW] qemu/pc-bios/s390-ccw/libc.c:82: bad test ? dcb
@ 2018-03-05 11:22 ` Christian Borntraeger
2018-03-05 14:53 ` Thomas Huth
2018-03-12 6:42 ` [Qemu-devel] [Bug 1753437] " Thomas Huth
` (3 subsequent siblings)
4 siblings, 1 reply; 8+ messages in thread
From: Christian Borntraeger @ 2018-03-05 11:22 UTC (permalink / raw)
To: Bug 1753437, qemu-devel, Cornelia Huck, Collin L. Walling, qemu-s390x
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.
>
> ** Affects: qemu
> Importance: Undecided
> Status: New
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Qemu-devel] [Bug 1753437] [NEW] qemu/pc-bios/s390-ccw/libc.c:82: bad test ?
2018-03-05 11:22 ` Christian Borntraeger
@ 2018-03-05 14:53 ` Thomas Huth
2018-03-05 15:30 ` [Qemu-devel] [qemu-s390x] " Collin L. Walling
0 siblings, 1 reply; 8+ messages in thread
From: Thomas Huth @ 2018-03-05 14:53 UTC (permalink / raw)
To: Christian Borntraeger, Bug 1753437, qemu-devel, Cornelia Huck,
Collin L. Walling, qemu-s390x
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
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Qemu-devel] [qemu-s390x] [Bug 1753437] [NEW] qemu/pc-bios/s390-ccw/libc.c:82: bad test ?
2018-03-05 14:53 ` Thomas Huth
@ 2018-03-05 15:30 ` Collin L. Walling
0 siblings, 0 replies; 8+ messages in thread
From: Collin L. Walling @ 2018-03-05 15:30 UTC (permalink / raw)
To: Thomas Huth, Christian Borntraeger, Bug 1753437, qemu-devel,
Cornelia Huck, qemu-s390x
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
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Qemu-devel] [Bug 1753437] Re: qemu/pc-bios/s390-ccw/libc.c:82: bad test ?
2018-03-05 10:31 [Qemu-devel] [Bug 1753437] [NEW] qemu/pc-bios/s390-ccw/libc.c:82: bad test ? dcb
2018-03-05 11:22 ` Christian Borntraeger
@ 2018-03-12 6:42 ` Thomas Huth
2018-04-13 15:47 ` [Qemu-devel] [Bug 1753437] Re: pc-bios/s390-ccw/libc: size_t should be unsigned Thomas Huth
` (2 subsequent siblings)
4 siblings, 0 replies; 8+ messages in thread
From: Thomas Huth @ 2018-03-12 6:42 UTC (permalink / raw)
To: qemu-devel
Looks like the mailing list <-> launchpad bridge again ignored mails to the corresponding mailing list thread. It's not a real bug, see here for details:
https://lists.gnu.org/archive/html/qemu-devel/2018-03/msg01142.html
I'll try to remember to clean this up the next time we update the s390-ccw bios.
** Changed in: qemu
Assignee: (unassigned) => Thomas Huth (th-huth)
** Changed in: qemu
Importance: Undecided => Low
** Changed in: qemu
Status: New => Confirmed
--
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1753437
Title:
qemu/pc-bios/s390-ccw/libc.c:82: bad test ?
Status in QEMU:
Confirmed
Bug description:
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.
To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1753437/+subscriptions
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Qemu-devel] [Bug 1753437] Re: pc-bios/s390-ccw/libc: size_t should be unsigned
2018-03-05 10:31 [Qemu-devel] [Bug 1753437] [NEW] qemu/pc-bios/s390-ccw/libc.c:82: bad test ? dcb
2018-03-05 11:22 ` Christian Borntraeger
2018-03-12 6:42 ` [Qemu-devel] [Bug 1753437] " Thomas Huth
@ 2018-04-13 15:47 ` Thomas Huth
2018-05-04 14:00 ` Thomas Huth
2018-08-15 7:28 ` Thomas Huth
4 siblings, 0 replies; 8+ messages in thread
From: Thomas Huth @ 2018-04-13 15:47 UTC (permalink / raw)
To: qemu-devel
** Summary changed:
- qemu/pc-bios/s390-ccw/libc.c:82: bad test ?
+ pc-bios/s390-ccw/libc: size_t should be unsigned
--
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1753437
Title:
pc-bios/s390-ccw/libc: size_t should be unsigned
Status in QEMU:
Confirmed
Bug description:
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.
To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1753437/+subscriptions
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Qemu-devel] [Bug 1753437] Re: pc-bios/s390-ccw/libc: size_t should be unsigned
2018-03-05 10:31 [Qemu-devel] [Bug 1753437] [NEW] qemu/pc-bios/s390-ccw/libc.c:82: bad test ? dcb
` (2 preceding siblings ...)
2018-04-13 15:47 ` [Qemu-devel] [Bug 1753437] Re: pc-bios/s390-ccw/libc: size_t should be unsigned Thomas Huth
@ 2018-05-04 14:00 ` Thomas Huth
2018-08-15 7:28 ` Thomas Huth
4 siblings, 0 replies; 8+ messages in thread
From: Thomas Huth @ 2018-05-04 14:00 UTC (permalink / raw)
To: qemu-devel
Fix has been committed:
https://git.qemu.org/?p=qemu.git;a=commitdiff;h=e4f869621203955761c
** Changed in: qemu
Status: Confirmed => Fix Committed
--
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1753437
Title:
pc-bios/s390-ccw/libc: size_t should be unsigned
Status in QEMU:
Fix Committed
Bug description:
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.
To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1753437/+subscriptions
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Qemu-devel] [Bug 1753437] Re: pc-bios/s390-ccw/libc: size_t should be unsigned
2018-03-05 10:31 [Qemu-devel] [Bug 1753437] [NEW] qemu/pc-bios/s390-ccw/libc.c:82: bad test ? dcb
` (3 preceding siblings ...)
2018-05-04 14:00 ` Thomas Huth
@ 2018-08-15 7:28 ` Thomas Huth
4 siblings, 0 replies; 8+ messages in thread
From: Thomas Huth @ 2018-08-15 7:28 UTC (permalink / raw)
To: qemu-devel
** Changed in: qemu
Status: Fix Committed => Fix Released
--
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1753437
Title:
pc-bios/s390-ccw/libc: size_t should be unsigned
Status in QEMU:
Fix Released
Bug description:
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.
To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1753437/+subscriptions
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2018-08-15 7:40 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-05 10:31 [Qemu-devel] [Bug 1753437] [NEW] qemu/pc-bios/s390-ccw/libc.c:82: bad test ? dcb
2018-03-05 11:22 ` Christian Borntraeger
2018-03-05 14:53 ` Thomas Huth
2018-03-05 15:30 ` [Qemu-devel] [qemu-s390x] " Collin L. Walling
2018-03-12 6:42 ` [Qemu-devel] [Bug 1753437] " Thomas Huth
2018-04-13 15:47 ` [Qemu-devel] [Bug 1753437] Re: pc-bios/s390-ccw/libc: size_t should be unsigned Thomas Huth
2018-05-04 14:00 ` Thomas Huth
2018-08-15 7:28 ` Thomas Huth
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.