Fix compiler warnings in acl.c for bitmaps specified as ~something in
authorPhilip Hazel <ph10@hermes.cam.ac.uk>
Wed, 12 Jan 2005 12:51:54 +0000 (12:51 +0000)
committerPhilip Hazel <ph10@hermes.cam.ac.uk>
Wed, 12 Jan 2005 12:51:54 +0000 (12:51 +0000)
unsigned ints.

doc/doc-txt/ChangeLog
src/src/acl.c
src/src/macros.h

index d878174e0d2120df57b81efac0eab3e51ebf63ef..ea2685f10b68e4920e71815da024d9888e15cd75 100644 (file)
@@ -1,4 +1,4 @@
-$Cambridge: exim/doc/doc-txt/ChangeLog,v 1.66 2005/01/12 12:17:41 ph10 Exp $
+$Cambridge: exim/doc/doc-txt/ChangeLog,v 1.67 2005/01/12 12:51:54 ph10 Exp $
 
 Change log file for Exim from version 4.21
 -------------------------------------------
@@ -300,6 +300,10 @@ Exim version 4.50
 68. The host_aton() function was not handling scoped IPv6 addresses (those
     with, for example, "%eth0" on the end) correctly.
 
+69. Fixed some compiler warnings in acl.c for the bitmaps specified with
+    negated items (that is, ~something) in unsigned ints. Some compilers
+    apparently mutter when there is no cast.
+
 
 Exim version 4.43
 -----------------
index 843a9ad26bed05386fc9b890d109da31aee303cf..dc3951221933385b81fec912ee03d4d3e28816ca 100644 (file)
@@ -1,4 +1,4 @@
-/* $Cambridge: exim/src/src/acl.c,v 1.13 2005/01/12 12:24:13 ph10 Exp $ */
+/* $Cambridge: exim/src/src/acl.c,v 1.14 2005/01/12 12:51:55 ph10 Exp $ */
 
 /*************************************************
 *     Exim - an Internet mail transport agent    *
@@ -216,6 +216,7 @@ each condition, there's a bitmap of dis-allowed times. */
 
 static unsigned int cond_forbids[] = {
   0,                                               /* acl */
+   
   (1<<ACL_WHERE_NOTSMTP)|(1<<ACL_WHERE_CONNECT)|   /* authenticated */
     (1<<ACL_WHERE_HELO),
   
@@ -270,7 +271,9 @@ static unsigned int cond_forbids[] = {
 
   (1<<ACL_WHERE_NOTSMTP)|(1<<ACL_WHERE_CONNECT)|   /* encrypted */
     (1<<ACL_WHERE_HELO),
+     
   0,                                               /* endpass */
+   
   (1<<ACL_WHERE_NOTSMTP),                          /* hosts */
 
   (1<<ACL_WHERE_NOTSMTP)|(1<<ACL_WHERE_AUTH)|      /* local_parts */
@@ -282,6 +285,7 @@ static unsigned int cond_forbids[] = {
     (1<<ACL_WHERE_VRFY),
 
   0,                                               /* log_message */
+   
   0,                                               /* logwrite */
   
 #ifdef WITH_CONTENT_SCAN
@@ -385,20 +389,30 @@ static unsigned int control_forbids[] = {
 #ifdef EXPERIMENTAL_BRIGHTMAIL
   0,                                               /* bmi_run */
 #endif
+
   0,                                               /* error */
+  
+  (unsigned int) 
   ~(1<<ACL_WHERE_RCPT),                            /* caseful_local_part */
+   
+  (unsigned int) 
   ~(1<<ACL_WHERE_RCPT),                            /* caselower_local_part */
+   
   (1<<ACL_WHERE_NOTSMTP),                          /* enforce_sync */
+   
   (1<<ACL_WHERE_NOTSMTP),                          /* no_enforce_sync */
    
+  (unsigned int) 
   ~((1<<ACL_WHERE_MAIL)|(1<<ACL_WHERE_RCPT)|       /* freeze */
     (1<<ACL_WHERE_PREDATA)|(1<<ACL_WHERE_DATA)|
     (1<<ACL_WHERE_NOTSMTP)),
      
+  (unsigned int) 
   ~((1<<ACL_WHERE_MAIL)|(1<<ACL_WHERE_RCPT)|       /* queue_only */
     (1<<ACL_WHERE_PREDATA)|(1<<ACL_WHERE_DATA)|
     (1<<ACL_WHERE_NOTSMTP)),
      
+  (unsigned int) 
   ~((1<<ACL_WHERE_MAIL)|(1<<ACL_WHERE_RCPT)|       /* submission */
     (1<<ACL_WHERE_PREDATA)),                       
 
@@ -406,6 +420,7 @@ static unsigned int control_forbids[] = {
   (1<<ACL_WHERE_NOTSMTP),                          /* no_mbox_unspool */
 #endif
 
+  (unsigned int) 
   ~((1<<ACL_WHERE_MAIL)|(1<<ACL_WHERE_RCPT)|       /* fakereject */
     (1<<ACL_WHERE_PREDATA)|(1<<ACL_WHERE_DATA)),
 
index 2e12138c09512d7cae5e68a9e6cca58e346ddbe1..57fa3bd12d7adbe16f0719e510087d9c036d17d7 100644 (file)
@@ -1,4 +1,4 @@
-/* $Cambridge: exim/src/src/macros.h,v 1.7 2005/01/04 10:00:42 ph10 Exp $ */
+/* $Cambridge: exim/src/src/macros.h,v 1.8 2005/01/12 12:51:55 ph10 Exp $ */
 
 /*************************************************
 *     Exim - an Internet mail transport agent    *
@@ -742,18 +742,15 @@ ordered to make it easy to implement tests for certain ACLs when processing
 order without checking carefully! Furthermore, remember to keep these in step
 with the tables of names and response codes in globals.c. */
 
-/* FIXME: the #ifdef below does not work here. Why? */
-
 enum { ACL_WHERE_RCPT,       /* Some controls are for RCPT only */
        ACL_WHERE_MAIL,       /* )                                           */
        ACL_WHERE_PREDATA,    /* ) There are several tests for "in message", */
                              /* ) implemented by <= WHERE_NOTSMTP           */
-                             /* )                                           */
-#ifdef WITH_CONTENT_SCAN
-       ACL_WHERE_MIME,       
-#endif
-       ACL_WHERE_DATA,       
-       ACL_WHERE_NOTSMTP,    
+#ifdef WITH_CONTENT_SCAN     /* )                                           */
+       ACL_WHERE_MIME,       /* )                                           */
+#endif                       /* )                                           */
+       ACL_WHERE_DATA,       /* )                                           */
+       ACL_WHERE_NOTSMTP,    /* )                                           */
 
        ACL_WHERE_AUTH,       /* These remaining ones are not currently    */
        ACL_WHERE_CONNECT,    /* required to be in a special order so they */