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

2025-05-16 Thread Robert Elz
Date:Fri, 16 May 2025 12:10:59 + From:nia Message-ID: | I don't like the idea of micro-optimizing an error path. Nor do I in general, and the original intent wasn't that, it was to avoid unnecessary line wrapping in the code (though that might have gotten lost

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

2025-05-16 Thread Martin Husemann
On Fri, May 16, 2025 at 07:05:30PM +0700, Robert Elz wrote: > And I agree with uwe@ and martin@ - that clang warning is absurd. I did not say that - it is a good warning for C++ code, but for NetBSD C code it is useless. Martin

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

2025-05-16 Thread nia
On Fri, May 16, 2025 at 07:05:30PM +0700, Robert Elz wrote: > How about we make it > &"lstat"[usestat] > then? > > Or even > &usestat["lstat"] > ? > > They all mean the same thing, but those might almost be considered obfuscated. > The first sounds as if it is what the clang warning w

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

2025-05-16 Thread nia
On Fri, May 16, 2025 at 01:48:14PM +0300, Valery Ushakov wrote: > I think we should turn that warning off. Do we have a central place to turn off compiler warnings for the whole tree? bsd.own.mk looks like the most obvious place to me but I'd expect to see at least some warnings already disabled.

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

2025-05-16 Thread Robert Elz
Date:Fri, 16 May 2025 07:50:28 + From:nia Message-ID: | I wasn't insinuating it's undefined behaviour, just obfuscating. I disagree. And one should always read (at least) surrounding code before trying to understand any small part of any code. How about we

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

2025-05-16 Thread Martin Husemann
On Fri, May 16, 2025 at 01:48:14PM +0300, Valery Ushakov wrote: > On Fri, May 16, 2025 at 07:50:28 +, nia wrote: > > > stat.c:357:27: error: adding 'int' to a string does not append to the > > string [-Werror,-Wstring-plus-int] > > ROFL. I think we should turn that warning off. I agree. M

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

2025-05-16 Thread Valery Ushakov
On Fri, May 16, 2025 at 07:50:28 +, nia wrote: > stat.c:357:27: error: adding 'int' to a string does not append to the string > [-Werror,-Wstring-plus-int] ROFL. I think we should turn that warning off. -uwe

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

2025-05-16 Thread nia
On Fri, May 16, 2025 at 02:32:19AM +0700, Robert Elz wrote: > Date:Thu, 15 May 2025 19:11:44 + > From:"Nia Alarie" > Message-ID: <20250515191144.954c6f...@cvs.netbsd.org> > > | stat(1): Eliminate a compiler warning > > What was the warning? stat.c:357:27: erro

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

2025-05-15 Thread Robert Elz
Date:Thu, 15 May 2025 19:11:44 + From:"Nia Alarie" Message-ID: <20250515191144.954c6f...@cvs.netbsd.org> | stat(1): Eliminate a compiler warning What was the warning? | This code at the moment is a bit magical, as it uses pointer arithemtic | on a string a

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

2024-03-14 Thread Roland Illig
Am 14.03.2024 um 21:27 schrieb Robert Elz: > Date:Thu, 14 Mar 2024 20:53:13 +0100 > From:Roland Illig > Message-ID: <9c7513f7-97b5-4d3b-9d66-dce483af7...@gmx.de> > > | I don't think the flags '+' and '0' make sense for strings, that's why I > | decided to preserve

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

2024-03-14 Thread Robert Elz
Date:Thu, 14 Mar 2024 20:53:13 +0100 From:Roland Illig Message-ID: <9c7513f7-97b5-4d3b-9d66-dce483af7...@gmx.de> | I don't think the flags '+' and '0' make sense for strings, that's why I | decided to preserve existing behavior. But the change only affected thing

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

2024-03-14 Thread Roland Illig
Am 14.03.2024 um 20:38 schrieb Robert Elz: > Module Name: src > Committed By: kre > Date: Thu Mar 14 19:38:56 UTC 2024 > > Modified Files: > src/usr.bin/stat: stat.c > > Log Message: > While the change in 1.51 certainly retained binary compat with > what was in 1.50 (while silencing

CVS commit: src/usr.bin/stat

2024-03-14 Thread Robert Elz
Module Name:src Committed By: kre Date: Thu Mar 14 19:38:56 UTC 2024 Modified Files: src/usr.bin/stat: stat.c Log Message: While the change in 1.51 certainly retained binary compat with what was in 1.50 (while silencing LINT) - it was clearly not the correct change to make

CVS commit: src/usr.bin/stat

2024-03-14 Thread Robert Elz
Module Name:src Committed By: kre Date: Thu Mar 14 19:38:56 UTC 2024 Modified Files: src/usr.bin/stat: stat.c Log Message: While the change in 1.51 certainly retained binary compat with what was in 1.50 (while silencing LINT) - it was clearly not the correct change to make

CVS commit: src/usr.bin/stat

2024-03-13 Thread Roland Illig
Module Name:src Committed By: rillig Date: Thu Mar 14 00:07:20 UTC 2024 Modified Files: src/usr.bin/stat: stat.c Log Message: stat: fix lint warning about constant argument to '!' No binary change. To generate a diff of this commit: cvs rdiff -u -r1.50 -r1.51 src/usr.bi

CVS commit: src/usr.bin/stat

2024-03-13 Thread Roland Illig
Module Name:src Committed By: rillig Date: Thu Mar 14 00:07:20 UTC 2024 Modified Files: src/usr.bin/stat: stat.c Log Message: stat: fix lint warning about constant argument to '!' No binary change. To generate a diff of this commit: cvs rdiff -u -r1.50 -r1.51 src/usr.bi

CVS commit: src/usr.bin/stat

2024-01-29 Thread Christos Zoulas
Module Name:src Committed By: christos Date: Mon Jan 29 22:01:58 UTC 2024 Modified Files: src/usr.bin/stat: Makefile stat.c Log Message: fix tools build To generate a diff of this commit: cvs rdiff -u -r1.14 -r1.15 src/usr.bin/stat/Makefile cvs rdiff -u -r1.49 -r1.50 src

CVS commit: src/usr.bin/stat

2024-01-29 Thread Christos Zoulas
Module Name:src Committed By: christos Date: Mon Jan 29 22:01:58 UTC 2024 Modified Files: src/usr.bin/stat: Makefile stat.c Log Message: fix tools build To generate a diff of this commit: cvs rdiff -u -r1.14 -r1.15 src/usr.bin/stat/Makefile cvs rdiff -u -r1.49 -r1.50 src

CVS commit: src/usr.bin/stat

2024-01-29 Thread Christos Zoulas
Module Name:src Committed By: christos Date: Mon Jan 29 21:55:24 UTC 2024 Modified Files: src/usr.bin/stat: Makefile stat.1 stat.c Log Message: PR/57891: Ricardo Branco: add symbolic flags printing (from FreeBSD) To generate a diff of this commit: cvs rdiff -u -r1.13 -r1

CVS commit: src/usr.bin/stat

2024-01-29 Thread Christos Zoulas
Module Name:src Committed By: christos Date: Mon Jan 29 21:55:24 UTC 2024 Modified Files: src/usr.bin/stat: Makefile stat.1 stat.c Log Message: PR/57891: Ricardo Branco: add symbolic flags printing (from FreeBSD) To generate a diff of this commit: cvs rdiff -u -r1.13 -r1

CVS commit: src/usr.bin/stat

2022-07-21 Thread Thomas Klausner
Module Name:src Committed By: wiz Date: Thu Jul 21 10:08:28 UTC 2022 Modified Files: src/usr.bin/stat: readlink.1 Log Message: readlink: sort SEE ALSO To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/usr.bin/stat/readlink.1 Please note that diffs are not

CVS commit: src/usr.bin/stat

2022-07-21 Thread Thomas Klausner
Module Name:src Committed By: wiz Date: Thu Jul 21 10:08:28 UTC 2022 Modified Files: src/usr.bin/stat: readlink.1 Log Message: readlink: sort SEE ALSO To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/usr.bin/stat/readlink.1 Please note that diffs are not

CVS commit: src/usr.bin/stat

2022-07-21 Thread Robert Elz
Module Name:src Committed By: kre Date: Thu Jul 21 10:00:31 UTC 2022 Modified Files: src/usr.bin/stat: readlink.1 Log Message: Add an Xr to realpath(1) (which does much the same as readlink -f). Try not to forget the damn comma! To generate a diff of this commit: cvs rdi

CVS commit: src/usr.bin/stat

2022-07-21 Thread Robert Elz
Module Name:src Committed By: kre Date: Thu Jul 21 10:00:31 UTC 2022 Modified Files: src/usr.bin/stat: readlink.1 Log Message: Add an Xr to realpath(1) (which does much the same as readlink -f). Try not to forget the damn comma! To generate a diff of this commit: cvs rdi

CVS commit: src/usr.bin/stat

2022-06-24 Thread Robert Elz
Module Name:src Committed By: kre Date: Fri Jun 24 13:11:45 UTC 2022 Modified Files: src/usr.bin/stat: stat.1 Log Message: Remove the notge (I added a day or so ago) about IFS interfering with -s output (potentially) - it is almost certainly wrong. To generate a diff of

CVS commit: src/usr.bin/stat

2022-06-24 Thread Robert Elz
Module Name:src Committed By: kre Date: Fri Jun 24 13:11:45 UTC 2022 Modified Files: src/usr.bin/stat: stat.1 Log Message: Remove the notge (I added a day or so ago) about IFS interfering with -s output (potentially) - it is almost certainly wrong. To generate a diff of

CVS commit: src/usr.bin/stat

2022-06-23 Thread Valeriy E. Ushakov
Module Name:src Committed By: uwe Date: Thu Jun 23 23:41:26 UTC 2022 Modified Files: src/usr.bin/stat: stat.1 Log Message: stat(1): Fix two more -width. To generate a diff of this commit: cvs rdiff -u -r1.44 -r1.45 src/usr.bin/stat/stat.1 Please note that diffs are not

CVS commit: src/usr.bin/stat

2022-06-23 Thread Valeriy E. Ushakov
Module Name:src Committed By: uwe Date: Thu Jun 23 23:41:26 UTC 2022 Modified Files: src/usr.bin/stat: stat.1 Log Message: stat(1): Fix two more -width. To generate a diff of this commit: cvs rdiff -u -r1.44 -r1.45 src/usr.bin/stat/stat.1 Please note that diffs are not

CVS commit: src/usr.bin/stat

2022-06-22 Thread Valeriy E. Ushakov
Module Name:src Committed By: uwe Date: Wed Jun 22 22:41:14 UTC 2022 Modified Files: src/usr.bin/stat: stat.1 Log Message: stat(1): Misc fixes. To generate a diff of this commit: cvs rdiff -u -r1.43 -r1.44 src/usr.bin/stat/stat.1 Please note that diffs are not public do

CVS commit: src/usr.bin/stat

2022-06-22 Thread Valeriy E. Ushakov
Module Name:src Committed By: uwe Date: Wed Jun 22 22:41:14 UTC 2022 Modified Files: src/usr.bin/stat: stat.1 Log Message: stat(1): Misc fixes. To generate a diff of this commit: cvs rdiff -u -r1.43 -r1.44 src/usr.bin/stat/stat.1 Please note that diffs are not public do

CVS commit: src/usr.bin/stat

2022-06-22 Thread Thomas Klausner
Module Name:src Committed By: wiz Date: Wed Jun 22 22:25:23 UTC 2022 Modified Files: src/usr.bin/stat: stat.1 Log Message: Use \(em, fix macro usage To generate a diff of this commit: cvs rdiff -u -r1.42 -r1.43 src/usr.bin/stat/stat.1 Please note that diffs are not publ

CVS commit: src/usr.bin/stat

2022-06-22 Thread Thomas Klausner
Module Name:src Committed By: wiz Date: Wed Jun 22 22:25:23 UTC 2022 Modified Files: src/usr.bin/stat: stat.1 Log Message: Use \(em, fix macro usage To generate a diff of this commit: cvs rdiff -u -r1.42 -r1.43 src/usr.bin/stat/stat.1 Please note that diffs are not publ

CVS commit: src/usr.bin/stat

2022-06-22 Thread Thomas Klausner
Module Name:src Committed By: wiz Date: Wed Jun 22 22:25:09 UTC 2022 Modified Files: src/usr.bin/stat: readlink.1 Log Message: Remove dot at end of SEE ALSO. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/usr.bin/stat/readlink.1 Please note that diffs a

CVS commit: src/usr.bin/stat

2022-06-22 Thread Thomas Klausner
Module Name:src Committed By: wiz Date: Wed Jun 22 22:25:09 UTC 2022 Modified Files: src/usr.bin/stat: readlink.1 Log Message: Remove dot at end of SEE ALSO. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/usr.bin/stat/readlink.1 Please note that diffs a

CVS commit: src/usr.bin/stat

2022-06-22 Thread Valeriy E. Ushakov
Module Name:src Committed By: uwe Date: Wed Jun 22 19:27:47 UTC 2022 Modified Files: src/usr.bin/stat: readlink.1 Log Message: readlink(1): Add italic correction. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/usr.bin/stat/readlink.1 Please note that di

CVS commit: src/usr.bin/stat

2022-06-22 Thread Valeriy E. Ushakov
Module Name:src Committed By: uwe Date: Wed Jun 22 19:27:47 UTC 2022 Modified Files: src/usr.bin/stat: readlink.1 Log Message: readlink(1): Add italic correction. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/usr.bin/stat/readlink.1 Please note that di

CVS commit: src/usr.bin/stat

2022-06-22 Thread Valeriy E. Ushakov
Module Name:src Committed By: uwe Date: Wed Jun 22 19:18:17 UTC 2022 Modified Files: src/usr.bin/stat: readlink.1 Log Message: readlink(1): Add missing .El, use non-random .Bl -width To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/usr.bin/stat/readlink.1

CVS commit: src/usr.bin/stat

2022-06-22 Thread Valeriy E. Ushakov
Module Name:src Committed By: uwe Date: Wed Jun 22 19:18:17 UTC 2022 Modified Files: src/usr.bin/stat: readlink.1 Log Message: readlink(1): Add missing .El, use non-random .Bl -width To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/usr.bin/stat/readlink.1

CVS commit: src/usr.bin/stat

2022-06-22 Thread Robert Elz
Module Name:src Committed By: kre Date: Wed Jun 22 18:20:30 UTC 2022 Modified Files: src/usr.bin/stat: stat.1 stat.c Log Message: Some corrections to stat to make it more reasonable, and comply with the man page, in particular, in one of the EXAMPLES it is claimed: T

CVS commit: src/usr.bin/stat

2022-06-22 Thread Robert Elz
Module Name:src Committed By: kre Date: Wed Jun 22 18:20:30 UTC 2022 Modified Files: src/usr.bin/stat: stat.1 stat.c Log Message: Some corrections to stat to make it more reasonable, and comply with the man page, in particular, in one of the EXAMPLES it is claimed: T

CVS commit: src/usr.bin/stat

2022-06-22 Thread Robert Elz
Module Name:src Committed By: kre Date: Wed Jun 22 18:02:43 UTC 2022 Modified Files: src/usr.bin/stat: Makefile stat.1 Added Files: src/usr.bin/stat: readlink.1 Log Message: Divide stat.1 into stat.1 (now only includes stat(1)) and readlink.1 Apologies to cvs comm

CVS commit: src/usr.bin/stat

2022-06-22 Thread Robert Elz
Module Name:src Committed By: kre Date: Wed Jun 22 18:02:43 UTC 2022 Modified Files: src/usr.bin/stat: Makefile stat.1 Added Files: src/usr.bin/stat: readlink.1 Log Message: Divide stat.1 into stat.1 (now only includes stat(1)) and readlink.1 Apologies to cvs comm

CVS commit: src/usr.bin/stat

2021-08-27 Thread Roland Illig
Module Name:src Committed By: rillig Date: Fri Aug 27 18:11:07 UTC 2021 Modified Files: src/usr.bin/stat: stat.c Log Message: stat: fix undefined behavior when calling ctype functions lint says: warning: argument to 'function from ' must be cast to 'unsigned char', not to

CVS commit: src/usr.bin/stat

2021-08-27 Thread Roland Illig
Module Name:src Committed By: rillig Date: Fri Aug 27 18:11:07 UTC 2021 Modified Files: src/usr.bin/stat: stat.c Log Message: stat: fix undefined behavior when calling ctype functions lint says: warning: argument to 'function from ' must be cast to 'unsigned char', not to

CVS commit: src/usr.bin/stat

2019-10-04 Thread matthew green
Module Name:src Committed By: mrg Date: Fri Oct 4 11:12:16 UTC 2019 Modified Files: src/usr.bin/stat: stat.c Log Message: adjust fallthru comment. To generate a diff of this commit: cvs rdiff -u -r1.44 -r1.45 src/usr.bin/stat/stat.c Please note that diffs are not publi

CVS commit: src/usr.bin/stat

2019-10-04 Thread matthew green
Module Name:src Committed By: mrg Date: Fri Oct 4 11:12:16 UTC 2019 Modified Files: src/usr.bin/stat: stat.c Log Message: adjust fallthru comment. To generate a diff of this commit: cvs rdiff -u -r1.44 -r1.45 src/usr.bin/stat/stat.c Please note that diffs are not publi

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

2010-11-24 Thread Christos Zoulas
On Nov 24, 11:49pm, dholland-sourcechan...@netbsd.org (David Holland) wrote: -- Subject: Re: CVS commit: src/usr.bin/stat | On Wed, Nov 24, 2010 at 11:11:36PM +, Christos Zoulas wrote: | > >- (void)snprintf(tmp, sizeof(tmp), "%dd", prec > 9 ? 9 : prec); | > >

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

2010-11-24 Thread David Holland
On Wed, Nov 24, 2010 at 11:11:36PM +, Christos Zoulas wrote: > >- (void)snprintf(tmp, sizeof(tmp), "%dd", prec > 9 ? 9 : prec); > >+ (void)snprintf(tmp, sizeof(tmp), "%dld", prec > 9 ? 9 : prec); > > perhaps %dlld? Nope, that's the nsecs, which are "long". I'm sort of

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

2010-11-24 Thread Christos Zoulas
In article <20101124225754.6201e17...@cvs.netbsd.org>, David A. Holland wrote: >- (void)snprintf(tmp, sizeof(tmp), "%dd", prec > 9 ? 9 : prec); >+ (void)snprintf(tmp, sizeof(tmp), "%dld", prec > 9 ? 9 : prec); perhaps %dlld? > (void)strcat(lfmt, tmp); >-