Re: git: acfb06062a68 - main - stress2: Fix warnings

From: Enji Cooper <yaneurabeya_at_gmail.com>
Date: Sat, 27 May 2023 20:55:23 UTC
> On May 27, 2023, at 12:35 PM, Peter Holm <pho@FreeBSD.org> wrote:
> 
> On Sat, May 27, 2023 at 11:10:23AM -0700, Enji Cooper wrote:
>> 
>>> On May 27, 2023, at 1:35 AM, Peter Holm <pho@FreeBSD.org> wrote:
>>> 
>>> The branch main has been updated by pho:
>>> 
>>> URL: https://cgit.FreeBSD.org/src/commit/?id=acfb06062a6862f7c823242243e68f7bcaf29999
>>> 
>>> commit acfb06062a6862f7c823242243e68f7bcaf29999
>>> Author:     Peter Holm <pho@FreeBSD.org>
>>> AuthorDate: 2023-05-27 08:31:00 +0000
>>> Commit:     Peter Holm <pho@FreeBSD.org>
>>> CommitDate: 2023-05-27 08:31:00 +0000
>>> 
>>>   stress2: Fix warnings
>> 
>> It seems like `n` could be removed in all of the sample programs.
>> Cheers,
>> -Enji
>> 
> 
> Both 'n' and 'm' are used if DEBUG is defined.
> 
> [pho@mercat1 /usr/src/tools/test/stress2/misc]$ ./reaper2.sh
> n = 19779 out of 56033
> n = 20099 out of 56319
> n = 20121 out of 56406

I see. Maybe the variables should only be declared/defined in the DEBUG case? Right now __unused kind of sends the wrong message to the developer and to the compiler (potentially).
Cheers,
-Enji