argp: Fix clang -Wextra-semi-stmt warning

2023-09-06 Thread Bruno Haible
It's pointless to use the do { ... } while (0) idiom and add a trailing semicolon inside the macro's expansion. 2023-09-06 Bruno Haible argp: Fix clang -Wextra-semi-stmt warning. * lib/argp-help.c (SKIPWS): Remove trailing semicolon. diff --git a/lib/argp-help.c b/lib

argp: Fix gcc -Wanalyzer-use-of-uninitialized-value warning

2023-09-04 Thread Bruno Haible
This warning argp-help.c:645:21: warning: use of uninitialized value '*hol.entries' [CWE-457] [-Wanalyzer-use-of-uninitialized-value] is justified. Here's a fix. 2023-09-04 Bruno Haible argp: Fix gcc -Wanalyzer-use-of-uninitialized-value warning. * lib/argp-help.c

Re: [Patch] argp: fix line wrapping in --help output

2016-02-22 Thread Simon Reinhardt
ping Am 09.02.2016 um 16:51 schrieb Simon Reinhardt: > Hi, > > Argp provides line wrapping of help and usage output. For this it > maintains a buffer in the struct argp_fmtstream_t. During line breaking > the buffer's contents grow due to the inserted spaces needed to indent > the lines

[Patch] argp: fix line wrapping in --help output

2016-02-09 Thread Simon Reinhardt
d"), GRID+1 }, {"warning", WARNING_OPTION, N_("KEYWORD"), 0, N_("warning control"), GRID+1 }, {"checkpoint", CHECKPOINT_OPTION, N_("NUMBER"), OPTION_ARG_OPTIONAL, N_("display progress messages every NUMBERth record (default 10)"), GRID+1 }, {"chec

Re: [PATCH] argp: fix HAVE_DECL usage error

2012-07-13 Thread Paul Eggert
On 07/13/2012 10:53 AM, Eric Blake wrote: Autoconf guarantees that AC_CHECK_DECLS_ONCE always defines the corresponding HAVE_DECL_*, so checking #ifndef HAVE_DECL_* is bogus. https://lists.gnu.org/archive/html/coreutils/2012-06/msg00037.html * lib/argp-parse.c (__argp_parse): Check contents

Re: [PATCH] argp: fix HAVE_DECL usage error

2012-07-13 Thread Eric Blake
On 07/13/2012 12:04 PM, Paul Eggert wrote: On 07/13/2012 10:53 AM, Eric Blake wrote: Autoconf guarantees that AC_CHECK_DECLS_ONCE always defines the corresponding HAVE_DECL_*, so checking #ifndef HAVE_DECL_* is bogus. https://lists.gnu.org/archive/html/coreutils/2012-06/msg00037.html *

[PATCH] argp: fix program_invocation_name detection

2010-11-18 Thread Mike Frysinger
The current program_invocation_name symbol detection fails if the argp.h header is missing. So check for the header first before detecting if the symbol exists. Signed-off-by: Mike Frysinger vap...@gentoo.org --- m4/argp.m4 | 15 +-- 1 files changed, 13 insertions(+), 2

Re: [PATCH] argp: fix program_invocation_name detection

2010-11-18 Thread Bruno Haible
Hi, Mike Frysinger wrote: The current program_invocation_name symbol detection fails if the argp.h header is missing. Your patch would make sense if there was a platform with an errno.h that declares program_invocation_name, but without an argp.h file. Which platform is this? Neither glibc,

Re: [PATCH] argp: fix program_invocation_name detection

2010-11-18 Thread Mike Frysinger
On Thursday, November 18, 2010 19:52:28 Bruno Haible wrote: Mike Frysinger wrote: The current program_invocation_name symbol detection fails if the argp.h header is missing. Your patch would make sense if there was a platform with an errno.h that declares program_invocation_name, but

Re: [PATCH] argp: fix program_invocation_name detection

2010-11-18 Thread Bruno Haible
Mike Frysinger wrote: The current program_invocation_name symbol detection fails if the argp.h header is missing. Your patch would make sense if there was a platform with an errno.h that declares program_invocation_name, but without an argp.h file. Which platform is this? uClibc

Re: [PATCH] argp: fix program_invocation_name detection

2010-11-18 Thread Mike Frysinger
On Thursday, November 18, 2010 22:38:18 Bruno Haible wrote: Mike Frysinger wrote: The current program_invocation_name symbol detection fails if the argp.h header is missing. Your patch would make sense if there was a platform with an errno.h that declares

Argp fix

2010-02-05 Thread Sergey Poznyakoff
. Regards, Sergey From 11fbc57405a118e6ec9a3ebc19bbf5ececdae4d6 Mon Sep 17 00:00:00 2001 From: Sergey Poznyakoff g...@gnu.org.ua Date: Fri, 5 Feb 2010 13:33:15 +0200 Subject: [PATCH] Argp: fix recognition of short alias options. * lib/argp-parse.c (convert_options): Fix improper use

Re: Argp fix

2010-02-05 Thread Simon Josefsson
Sergey Poznyakoff g...@gnu.org.ua writes: Hello, Argp failed to properly recognize alias options that have short option letters. For instance, in this setup: { dstaddr, 'd', ADDR, 0, set destination (peer) address to ADDR }, { peer, 'p', ADDR, OPTION_ALIAS }, both --peer and -p

Re: Argp fix

2010-02-05 Thread Sergey Poznyakoff
Simon Josefsson si...@josefsson.org ha escrit: Ouch. Should this be reported to glibc as well? Yes, I'll do it. Regards, Sergey

Re: argp: fix test failure on mingw

2008-04-22 Thread Jim Meyering
Bruno Haible [EMAIL PROTECTED] wrote: ... -}' | diff -c $TMP - +}' | LC_ALL=C tr -d '\r' | diff -c $TMP - Here, too: using tr -d '\015' is more portable.

argp: fix test failure on mingw

2008-04-21 Thread Bruno Haible
This fixes a test failure on mingw, in the cygwin development environment. 2008-04-21 Bruno Haible [EMAIL PROTECTED] Fix test failure on mingw. * tests/test-argp-2.sh (func_compare): Remove CRs from sed's output. --- tests/test-argp-2.sh.orig 2008-04-22 00:30:20.0

Re: [PATCH] argp: fix logic in hol_cluster_cmp

2007-04-29 Thread Sergey Poznyakoff
Thank you. I applied this change. Regards, Sergey

Re: [PATCH] argp: fix logic in hol_cluster_cmp

2007-04-29 Thread Bruno Haible
Sergey Poznyakoff wrote: Thank you. I applied this change. This source code is shared with glibc. Can you also file a glibc bug for it? http://sources.redhat.com/bugzilla/ Bruno

[PATCH] argp: fix logic in hol_cluster_cmp

2007-04-25 Thread skimo
From: Sven Verdoolaege [EMAIL PROTECTED] --- lib/argp-help.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/argp-help.c b/lib/argp-help.c index 7321480..627bf9e 100644 --- a/lib/argp-help.c +++ b/lib/argp-help.c @@ -674,9 +674,9 @@ hol_cluster_cmp (const struct

argp: fix __restrict for older compilers

2007-03-25 Thread Bruno Haible
On BeOS, which has a gcc compiler older than 2.95, one gets syntax errors in gnulib's string.h due to 'restrict'. The reason is that - configure does a #define restrict __restrict, since gcc supports that keyword. - argp.h does #define __restrict restrict, since it sees that 'restrict'