summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilip Hazel <ph10@hermes.cam.ac.uk>2005-01-12 12:51:54 +0000
committerPhilip Hazel <ph10@hermes.cam.ac.uk>2005-01-12 12:51:54 +0000
commit3e11c26bcb99479c8bea9fab9acc71878666f278 (patch)
tree16c58fd35c95efa26b520d05a60a4041146cb6ee
parentdefae7954e83a2e1b429027a31f8dd5df1484847 (diff)
Fix compiler warnings in acl.c for bitmaps specified as ~something in
unsigned ints.
-rw-r--r--doc/doc-txt/ChangeLog6
-rw-r--r--src/src/acl.c17
-rw-r--r--src/src/macros.h15
3 files changed, 27 insertions, 11 deletions
diff --git a/doc/doc-txt/ChangeLog b/doc/doc-txt/ChangeLog
index d878174e0..ea2685f10 100644
--- a/doc/doc-txt/ChangeLog
+++ b/doc/doc-txt/ChangeLog
@@ -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
-----------------
diff --git a/src/src/acl.c b/src/src/acl.c
index 843a9ad26..dc3951221 100644
--- a/src/src/acl.c
+++ b/src/src/acl.c
@@ -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)),
diff --git a/src/src/macros.h b/src/src/macros.h
index 2e12138c0..57fa3bd12 100644
--- a/src/src/macros.h
+++ b/src/src/macros.h
@@ -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 */