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)

Reply via email to