Source-Changes-D archive

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

Re: CVS commit: src/usr.bin/make



Am 30.01.2022 um 20:54 schrieb Christos Zoulas:

On Jan 30, 2022, at 2:41 PM, Roland Illig <roland.illig%gmx.de@localhost
<mailto:roland.illig%gmx.de@localhost>> wrote:

Am 30.01.2022 um 14:21 schrieb Christos Zoulas:
Module Name:src
Committed By:christos
Date:Sun Jan 30 13:21:09 UTC 2022

Modified Files:
src/usr.bin/make: dir.c job.c make.h

Log Message:
Make the GNode lineno unsigned to fix lint warning in var.c calling
PrintLocation()

Hi Christos,

Did you get that warning on i386?  On x86_64 I didn't get any lint
warnings, as these would have made my pre-commit hook fail.

Yes:
https://releng.netbsd.org/builds/HEAD-lint/202201300710Z/i386.build.failed
Do you know it would only fail on i386?

No, I didn't know, and I also couldn't guess the lint warning, that's
why I asked.  The lint warning from the log is:

var.c(4527): warning: argument #4 is converted from 'int' to 'unsigned
int' due to prototype [259]

The warning makes sense, and it doesn't occur on x86_64 because size_t
is a 64-bit integer type there, which can hold any value of int.  But
still, the representation might change, so lint should warn.  Not about
potential value truncation, but about prototype compatibility.  In
lint's should_warn_about_prototype_conversion, I already wrote a comment
saying 'XXX: Investigate whether this rule makes sense', so it's
probably a conceptual bug in lint that this warning didn't occur on x86_64.

Roland


Home | Main Index | Thread Index | Old Index