[exim-cvs] Silence compiler

Página superior
Eliminar este mensaje
Responder a este mensaje
Autor: Exim Git Commits Mailing List
Fecha:  
A: exim-cvs
Asunto: [exim-cvs] Silence compiler
Gitweb: https://git.exim.org/exim.git/commitdiff/060cf1e3c9a0a6960b771cdff6f0a5a2ca9b114c
Commit:     060cf1e3c9a0a6960b771cdff6f0a5a2ca9b114c
Parent:     07343a5b1968f4f5e41664c15fd636bdb6a6cc48
Author:     Heiko Schlittermann (HS12-RIPE) <hs@???>
AuthorDate: Fri Apr 23 17:40:40 2021 +0200
Committer:  Heiko Schlittermann (HS12-RIPE) <hs@???>
CommitDate: Thu Jun 24 21:46:56 2021 +0200


    Silence compiler


    (cherry picked from commit 2c9869d0622cc690b424cc74166d4a8393017ece)
---
 src/src/acl.c                   |  2 +-
 src/src/deliver.c               |  3 +--
 src/src/expand.c                |  6 +++++-
 src/src/functions.h             |  2 +-
 src/src/lookups/lf_sqlperform.c |  4 ++--
 src/src/parse.c                 |  2 +-
 src/src/rda.c                   |  2 +-
 src/src/transports/autoreply.c  | 12 ++++++------
 src/src/transports/pipe.c       |  4 ++--
 9 files changed, 20 insertions(+), 17 deletions(-)


diff --git a/src/src/acl.c b/src/src/acl.c
index 56d7468..1bf1187 100644
--- a/src/src/acl.c
+++ b/src/src/acl.c
@@ -3704,7 +3704,7 @@ for (; cb; cb = cb->next)
     case ACLC_QUEUE:
       {
       uschar *m;
-      if (m = is_tainted2(arg, 0, "Tainted name '%s' for queue not permitted", arg))
+      if ((m = is_tainted2(arg, 0, "Tainted name '%s' for queue not permitted", arg)))
         {
         *log_msgptr = m;
         return ERROR;
diff --git a/src/src/deliver.c b/src/src/deliver.c
index b5530bc..f9f6746 100644
--- a/src/src/deliver.c
+++ b/src/src/deliver.c
@@ -6161,12 +6161,11 @@ else if (system_filter && process_recipients != RECIP_FAIL_TIMEOUT)
           {
           uschar *tmp = expand_string(tpname);
           address_file = address_pipe = NULL;
-          uschar *m;
           if (!tmp)
             p->message = string_sprintf("failed to expand \"%s\" as a "
               "system filter transport name", tpname);
           { uschar *m;
-      if (m = is_tainted2(tmp, 0, "Tainted values '%s' " "for transport '%s' as a system filter", tmp, tpname))
+      if ((m = is_tainted2(tmp, 0, "Tainted values '%s' " "for transport '%s' as a system filter", tmp, tpname)))
             p->message = m;
           }
           tpname = tmp;
diff --git a/src/src/expand.c b/src/src/expand.c
index 0ae2aea..4fb9355 100644
--- a/src/src/expand.c
+++ b/src/src/expand.c
@@ -4484,7 +4484,7 @@ f.expand_string_forcedfail = FALSE;
 expand_string_message = US"";


 { uschar *m;
-if (m = is_tainted2(string, LOG_MAIN|LOG_PANIC, "Tainted string '%s' in expansion", s))
+if ((m = is_tainted2(string, LOG_MAIN|LOG_PANIC, "Tainted string '%s' in expansion", s)))
   {
   expand_string_message = m;
   goto EXPAND_FAILED;
@@ -7645,10 +7645,12 @@ while (*s)
     /* Manually track tainting, as we deal in individual chars below */


     if (is_tainted(sub))
+          {
       if (yield->s && yield->ptr)
         gstring_rebuffer(yield);
       else
         yield->s = store_get(yield->size = Ustrlen(sub), TRUE);
+          }


     /* Check the UTF-8, byte-by-byte */


@@ -8209,6 +8211,7 @@ that is a bad idea, because expand_string_message is in dynamic store. */
 EXPAND_FAILED:
 if (left) *left = s;
 DEBUG(D_expand)
+  {
   DEBUG(D_noutf8)
     {
     debug_printf_indent("|failed to expand: %s\n", string);
@@ -8228,6 +8231,7 @@ DEBUG(D_expand)
     if (f.expand_string_forcedfail)
       debug_printf_indent(UTF8_UP_RIGHT "failure was forced\n");
     }
+  }
 if (resetok_p && !resetok) *resetok_p = FALSE;
 expand_level--;
 return NULL;
diff --git a/src/src/functions.h b/src/src/functions.h
index 27c298c..6029ab4 100644
--- a/src/src/functions.h
+++ b/src/src/functions.h
@@ -1126,7 +1126,7 @@ if (f.running_in_test_harness && f.testsuite_delays) millisleep(millisec);
 /******************************************************************************/
 /* Taint-checked file opens */
 static inline uschar *
-is_tainted2(const void *p, int lflags, const uschar* fmt, ...)
+is_tainted2(const void *p, int lflags, const char* fmt, ...)
 {
 va_list ap;
 uschar *msg;
diff --git a/src/src/lookups/lf_sqlperform.c b/src/src/lookups/lf_sqlperform.c
index eda3089..38b7c2a 100644
--- a/src/src/lookups/lf_sqlperform.c
+++ b/src/src/lookups/lf_sqlperform.c
@@ -103,7 +103,7 @@ if (Ustrncmp(query, "servers", 7) == 0)
       }


     { uschar *m;
-    if (m = is_tainted2(server, 0, "Tainted %s server '%s'", name, server))
+    if ((m = is_tainted2(server, 0, "Tainted %s server '%s'", name, server)))
      {
       *errmsg = m;
       return DEFER;
@@ -161,7 +161,7 @@ else
     }


       { uschar *m;
-      if (is_tainted2(server, 0, "Tainted %s server '%s'", name, server))
+      if ((m = is_tainted2(server, 0, "Tainted %s server '%s'", name, server)))
         {
         *errmsg = m;
         return DEFER;
diff --git a/src/src/parse.c b/src/src/parse.c
index e70dabd..896d00f 100644
--- a/src/src/parse.c
+++ b/src/src/parse.c
@@ -1415,7 +1415,7 @@ for (;;)
       return FF_ERROR;
       }


-    if (*error = is_tainted2(filename, 0, "Tainted name '%s' for included file not permitted\n", filename))
+    if ((*error = is_tainted2(filename, 0, "Tainted name '%s' for included file not permitted\n", filename)))
       return FF_ERROR;


     /* Check file name if required */
diff --git a/src/src/rda.c b/src/src/rda.c
index 3b45843..a12e5de 100644
--- a/src/src/rda.c
+++ b/src/src/rda.c
@@ -179,7 +179,7 @@ struct stat statbuf;
 /* Reading a file is a form of expansion; we wish to deny attackers the
 capability to specify the file name. */


-if (*error = is_tainted2(filename, 0, "Tainted name '%s' for file read not permitted\n", filename))
+if ((*error = is_tainted2(filename, 0, "Tainted name '%s' for file read not permitted\n", filename)))
{
*yield = FF_ERROR;
return NULL;
diff --git a/src/src/transports/autoreply.c b/src/src/transports/autoreply.c
index ed99de4..80c7c0d 100644
--- a/src/src/transports/autoreply.c
+++ b/src/src/transports/autoreply.c
@@ -407,8 +407,8 @@ if (oncelog && *oncelog && to)
uschar *m;
time_t then = 0;

-  if (m = is_tainted2(oncelog, 0, "Tainted '%s' (once file for %s transport)"
-      " not permitted", oncelog, tblock->name))
+  if ((m = is_tainted2(oncelog, 0, "Tainted '%s' (once file for %s transport)"
+      " not permitted", oncelog, tblock->name)))
     {
     addr->transport_return = DEFER;
     addr->basic_errno = EACCES;
@@ -518,8 +518,8 @@ if (oncelog && *oncelog && to)
     {
     uschar *m;
     int log_fd;
-    if (m = is_tainted2(logfile, 0, "Tainted '%s' (logfile for %s transport)"
-    " not permitted", logfile, tblock->name))
+    if ((m = is_tainted2(logfile, 0, "Tainted '%s' (logfile for %s transport)"
+    " not permitted", logfile, tblock->name)))
       {
       addr->transport_return = DEFER;
       addr->basic_errno = EACCES;
@@ -551,8 +551,8 @@ if (oncelog && *oncelog && to)
 if (file)
   {
   uschar *m;
-  if (m = is_tainted2(file, 0, "Tainted '%s' (file for %s transport)"
-      " not permitted", file, tblock->name))
+  if ((m = is_tainted2(file, 0, "Tainted '%s' (file for %s transport)"
+      " not permitted", file, tblock->name)))
     {
     addr->transport_return = DEFER;
     addr->basic_errno = EACCES;
diff --git a/src/src/transports/pipe.c b/src/src/transports/pipe.c
index 9296814..da49307 100644
--- a/src/src/transports/pipe.c
+++ b/src/src/transports/pipe.c
@@ -594,8 +594,8 @@ if (!cmd || !*cmd)
   }


 { uschar *m;
-if (m = is_tainted2(cmd, 0, "Tainted '%s' (command "
-    "for %s transport) not permitted", cmd, tblock->name))
+if ((m = is_tainted2(cmd, 0, "Tainted '%s' (command "
+    "for %s transport) not permitted", cmd, tblock->name)))
   {
   addr->transport_return = PANIC;
   addr->message = m;