Re: [PATCH] fix gcc-11 build warnings for H_TO_INTL()
On Fri, May 28, 2021 at 02:23:37PM +0200, Greg Kroah-Hartman wrote: The macro H_TO_INTL() in mutt_idna.c, causes a lot of build warnings about the indentation of the if () line to try to warn the developer that it looks like this might be a bug: Applied. Thank you Greg! -- Kevin J. McCarthy GPG Fingerprint: 8975 A9B3 3AA3 7910 385C 5308 ADEF 7684 8031 6BDA signature.asc Description: PGP signature
Re: [PATCH] Trim the ToC for the option list in the manual
On Fri, May 28, 2021 at 02:38:41PM +0300, Maxim Tarasov wrote: Currently, every variable is shown in the table of contents of the reference manual. Variable list is over 400 items long. This makes the ToC difficult to work with. Applied. Thank you Maxim! -- Kevin J. McCarthy GPG Fingerprint: 8975 A9B3 3AA3 7910 385C 5308 ADEF 7684 8031 6BDA signature.asc Description: PGP signature
[PATCH] fix gcc-11 build warnings for H_TO_INTL()
The macro H_TO_INTL() in mutt_idna.c, causes a lot of build warnings about the indentation of the if () line to try to warn the developer that it looks like this might be a bug: mutt_idna.c: In function ‘mutt_env_to_intl’: mutt_idna.c:327:5: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation] 327 | if (tag) *tag = #a; e = 1; err = NULL; \ | ^~ mutt_idna.c:333:3: note: in expansion of macro ‘H_TO_INTL’ 333 | H_TO_INTL(return_path); | ^ mutt_idna.c:327:25: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’ 327 | if (tag) *tag = #a; e = 1; err = NULL; \ | ^ mutt_idna.c:333:3: note: in expansion of macro ‘H_TO_INTL’ 333 | H_TO_INTL(return_path); | ^ This goes on for many lines. Fix this up by properly indenting the lines so that gcc "knows" we mean well here. diff --git a/mutt_idna.c b/mutt_idna.c index db010e9b1946..0a37e6559a0e 100644 --- a/mutt_idna.c +++ b/mutt_idna.c @@ -324,7 +324,10 @@ void mutt_env_to_local (ENVELOPE *e) #define H_TO_INTL(a)\ if (mutt_addrlist_to_intl (env->a, err) && !e)\ { \ -if (tag) *tag = #a; e = 1; err = NULL; \ +if (tag)\ + *tag = #a;\ +e = 1; \ +err = NULL; \ } int mutt_env_to_intl (ENVELOPE *env, char **tag, char **err)
[PATCH] Trim the ToC for the option list in the manual
Currently, every variable is shown in the table of contents of the reference manual. Variable list is over 400 items long. This makes the ToC difficult to work with. Removing is done by adding an overwriting template for the parent of variables section (that is sect1 tag with id="variables"). In the DocBook source matching template calls another template named subtoc with two parameters: context (self element) and nodes (child sections). Normally a list of descendant nodes is passed here, but we don't want that and instead call subtoc with no parameters. This approach results in semantically correct code being generated in all modes. Note, that the ID (variables) will have to be kept in sync with XML generating code, but that is already hardcoded elsewhere. --- doc/TODO | 4 doc/mutt.xsl | 3 +++ 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/doc/TODO b/doc/TODO index 75b9596b..da1fb17d 100644 --- a/doc/TODO +++ b/doc/TODO @@ -30,10 +30,6 @@ Style/Technical perl already to build docs, think about/look for simple perl templating engine. -* Find a way (XSLT?) to trim the TOC for the option reference; it's - ugly but we probably want to keep the TOC depth as-is for other - sections. - Content --- diff --git a/doc/mutt.xsl b/doc/mutt.xsl index a075a5b3..a3558e69 100644 --- a/doc/mutt.xsl +++ b/doc/mutt.xsl @@ -11,4 +11,7 @@ + + + -- 2.32.0.rc0