From: Jeremy Harris Date: Sat, 27 Jun 2020 12:21:59 +0000 (+0100) Subject: Remove attempts to quieten compiler static-checking X-Git-Tag: exim-4.95-RC0~304 X-Git-Url: https://git.exim.org/exim.git/commitdiff_plain/d4c9963ace2b653f657c74abecfecb7546c722b1 Remove attempts to quieten compiler static-checking The rash of output from -Wself-assign on Darwin demonstrates just how pointless this war is --- diff --git a/src/exim_monitor/em_main.c b/src/exim_monitor/em_main.c index 9c7f442e5..88bf1fcb7 100644 --- a/src/exim_monitor/em_main.c +++ b/src/exim_monitor/em_main.c @@ -173,8 +173,6 @@ va_start(ap, format); vfprintf(stderr, format, ap); fprintf(stderr, "\n"); va_end(ap); -selector = selector; /* Keep picky compilers happy */ -flags = flags; } @@ -240,9 +238,6 @@ if (action_queue_update) tick_queue_accumulator = 999999; void updateAction(Widget w, XtPointer client_data, XtPointer call_data) { -w = w; /* Keep picky compilers happy */ -client_data = client_data; -call_data = call_data; scan_spool_input(TRUE); queue_display(); tick_queue_accumulator = 0; @@ -250,9 +245,6 @@ tick_queue_accumulator = 0; void hideAction(Widget w, XtPointer client_data, XtPointer call_data) { -w = w; /* Keep picky compilers happy */ -client_data = client_data; -call_data = call_data; actioned_message[0] = 0; dialog_ref_widget = w; dialog_action = da_hide; @@ -263,11 +255,7 @@ void unhideAction(Widget w, XtPointer client_data, XtPointer call_data) { skip_item *sk = queue_skip; -w = w; /* Keep picky compilers happy */ -client_data = client_data; -call_data = call_data; - -while (sk != NULL) +while (sk) { skip_item *next = sk->next; store_free(sk); @@ -285,9 +273,6 @@ tick_queue_accumulator = 0; void quitAction(Widget w, XtPointer client_data, XtPointer call_data) { -w = w; /* Keep picky compilers happy */ -client_data = client_data; -call_data = call_data; exit(0); } @@ -318,10 +303,6 @@ Dimension width, height; XWindowAttributes a; Window w = XtWindow(toplevel_widget); -button = button; /* Keep picky compilers happy */ -client_data = client_data; -call_data = call_data; - /* Get the position and size of the top level widget. */ sizepos_args[0].value = (XtArgVal)(&width); @@ -473,9 +454,6 @@ tick_queue_accumulator += tick_interval; tick_stripchart_accumulator += tick_interval; read_log(); -pt = pt; /* Keep picky compilers happy */ -i = i; - /* If we have passed the queue update time, we must do a full scan of the queue, checking for new arrivals, etc. This will as a by-product set the count of items for use by the stripchart diff --git a/src/exim_monitor/em_menu.c b/src/exim_monitor/em_menu.c index 33b3e0c94..18e6a87da 100644 --- a/src/exim_monitor/em_menu.c +++ b/src/exim_monitor/em_menu.c @@ -117,8 +117,6 @@ static Arg item_99_arg[] = { static void popdownAction(Widget w, XtPointer client_data, XtPointer call_data) { -client_data = client_data; /* Keep picky compilers happy */ -call_data = call_data; if (highlighted_x >= 0) XawTextSinkDisplayText(queue_text_sink, highlighted_x, highlighted_y, @@ -136,17 +134,13 @@ menu_is_up = FALSE; static void msglogAction(Widget w, XtPointer client_data, XtPointer call_data) { -int i; Widget text = text_create(US client_data, text_depth); uschar * fname = NULL; FILE * f = NULL; -w = w; /* Keep picky compilers happy */ -call_data = call_data; - /* End up with the split version, so message looks right when non-exist */ -for (i = 0; i < (spool_is_split ? 2:1); i++) +for (int i = 0; i < (spool_is_split ? 2:1); i++) { message_subdir[0] = i != 0 ? (US client_data)[5] : 0; fname = spool_fname(US"msglog", message_subdir, US client_data, US""); @@ -173,14 +167,10 @@ else static void bodyAction(Widget w, XtPointer client_data, XtPointer call_data) { -int i; Widget text = text_create(US client_data, text_depth); FILE *f = NULL; -w = w; /* Keep picky compilers happy */ -call_data = call_data; - -for (i = 0; i < (spool_is_split? 2:1); i++) +for (int i = 0; i < (spool_is_split? 2:1); i++) { uschar * fname; message_subdir[0] = i != 0 ? (US client_data)[5] : 0; @@ -189,7 +179,7 @@ for (i = 0; i < (spool_is_split? 2:1); i++) break; } -if (f == NULL) +if (!f) text_showf(text, "Failed to open file: %s\n", strerror(errno)); else { @@ -409,8 +399,6 @@ if (pid < 0) text_showf(text, "Failed to fork: %s\n", strerror(errno)); else static void deliverAction(Widget w, XtPointer client_data, XtPointer call_data) { -w = w; /* Keep picky compilers happy */ -call_data = call_data; ActOnMessage(US client_data, US"-v -M", US""); } @@ -422,8 +410,6 @@ ActOnMessage(US client_data, US"-v -M", US""); static void freezeAction(Widget w, XtPointer client_data, XtPointer call_data) { -w = w; /* Keep picky compilers happy */ -call_data = call_data; ActOnMessage(US client_data, US"-Mf", US""); } @@ -435,8 +421,6 @@ ActOnMessage(US client_data, US"-Mf", US""); static void thawAction(Widget w, XtPointer client_data, XtPointer call_data) { -w = w; /* Keep picky compilers happy */ -call_data = call_data; ActOnMessage(US client_data, US"-Mt", US""); } @@ -454,21 +438,14 @@ XtActionProc dialogAction(Widget w, XEvent *event, String *ss, Cardinal *c) { uschar *s = US XawDialogGetValueString(dialog_widget); -w = w; /* Keep picky compilers happy */ -event = event; -ss = ss; -c = c; - XtPopdown((Widget)dialog_shell); XtDestroyWidget((Widget)dialog_shell); while (isspace(*s)) s++; if (s[0] != 0) - { if (actioned_message[0] != 0) ActOnMessage(actioned_message, action_required, s); else NonMessageDialogue(s); /* When called from somewhere else */ - } return NULL; } @@ -556,8 +533,6 @@ in. */ static void addrecipAction(Widget w, XtPointer client_data, XtPointer call_data) { -w = w; /* Keep picky compilers happy */ -call_data = call_data; Ustrncpy(actioned_message, client_data, 24); actioned_message[23] = '\0'; action_required = US"-Mar"; @@ -573,8 +548,6 @@ create_dialog(US"Recipient address to add?", US""); static void markdelAction(Widget w, XtPointer client_data, XtPointer call_data) { -w = w; /* Keep picky compilers happy */ -call_data = call_data; Ustrncpy(actioned_message, client_data, 24); actioned_message[23] = '\0'; action_required = US"-Mmd"; @@ -589,8 +562,6 @@ create_dialog(US"Recipient address to mark delivered?", US""); static void markalldelAction(Widget w, XtPointer client_data, XtPointer call_data) { -w = w; /* Keep picky compilers happy */ -call_data = call_data; ActOnMessage(US client_data, US"-Mmad", US""); } @@ -604,8 +575,7 @@ static void editsenderAction(Widget w, XtPointer client_data, { queue_item *q; uschar *sender; -w = w; /* Keep picky compilers happy */ -call_data = call_data; + Ustrncpy(actioned_message, client_data, 24); actioned_message[23] = '\0'; q = find_queue(actioned_message, queue_noop, 0); @@ -622,8 +592,6 @@ create_dialog(US"New sender address?", sender); static void giveupAction(Widget w, XtPointer client_data, XtPointer call_data) { -w = w; /* Keep picky compilers happy */ -call_data = call_data; ActOnMessage(US client_data, US"-v -Mg", US""); } @@ -635,8 +603,6 @@ ActOnMessage(US client_data, US"-v -Mg", US""); static void removeAction(Widget w, XtPointer client_data, XtPointer call_data) { -w = w; /* Keep picky compilers happy */ -call_data = call_data; ActOnMessage(US client_data, US"-Mrm", US""); } @@ -653,9 +619,6 @@ header_line *h, *next; Widget text = text_create(US client_data, text_depth); rmark reset_point; -w = w; /* Keep picky compilers happy */ -call_data = call_data; - /* Remember the point in the dynamic store so we can recover to it afterwards. Then use Exim's function to read the header. */ @@ -678,26 +641,24 @@ if (spool_read_header(buffer, TRUE, FALSE) != spool_read_OK) return; } -if (sender_address != NULL) +if (sender_address) { text_showf(text, "%s sender: <%s>\n", f.sender_local ? "Local" : "Remote", sender_address); } -if (recipients_list != NULL) +if (recipients_list) { int i; text_show(text, US"Recipients:\n"); for (i = 0; i < recipients_count; i++) - { text_showf(text, " %s %s\n", (tree_search(tree_nonrecipients, recipients_list[i].address) == NULL)? " ":"*", recipients_list[i].address); - } text_show(text, US"\n"); } -for (h = header_list; h != NULL; h = next) +for (h = header_list; h; h = next) { next = h->next; text_showf(text, "%c ", h->type); /* Don't push h->text through a %s */ @@ -716,11 +677,6 @@ store_reset(reset_point); static void dismissAction(Widget w, XtPointer client_data, XtPointer call_data) { -pipe_item *p = pipe_chain; - -w = w; /* Keep picky compilers happy */ -call_data = call_data; - XtPopdown((Widget)client_data); XtDestroyWidget((Widget)client_data); @@ -729,16 +685,9 @@ the chain so that subsequent data doesn't try to use it. We have to search the parents of the saved widget to see if one of them is what we have just destroyed. */ -while (p != NULL) - { - Widget pp = p->widget; - while (pp != NULL) - { +for (pipe_item * p = pipe_chain; p; p = p->next) + for (Widget pp = p->widget; pp; pp = XtParent(pp)) if (pp == (Widget)client_data) { p->widget = NULL; return; } - pp = XtParent(pp); - } - p = p->next; - } } @@ -824,9 +773,6 @@ XtTranslations menu_trans = XtParseTranslationTable( : MenuPopdown()notify()unhighlight()\n\ "); -actargs = actargs; /* Keep picky compilers happy */ -count = count; - /* Get the sink and source and the current text pointer */ queue_get_arg[0].value = (XtArgVal)(&queue_text_sink); diff --git a/src/src/auths/pwcheck.c b/src/src/auths/pwcheck.c index f733b9898..8e51f1757 100644 --- a/src/src/auths/pwcheck.c +++ b/src/src/auths/pwcheck.c @@ -86,8 +86,6 @@ int pwcheck_verify_password(const char *userid, const char *passwd, const char **reply) { -userid = userid; /* Keep picky compilers happy */ -passwd = passwd; *reply = "pwcheck support is not included in this Exim binary"; return PWCHECK_FAIL; } @@ -163,10 +161,6 @@ int saslauthd_verify_password(const uschar *userid, const uschar *realm, const uschar **reply) { -userid = userid; /* Keep picky compilers happy */ -passwd = passwd; -service = service; -realm = realm; *reply = US"saslauthd support is not included in this Exim binary"; return PWCHECK_FAIL; } diff --git a/src/src/daemon.c b/src/src/daemon.c index 8c9abc7dc..09cb1a7f1 100644 --- a/src/src/daemon.c +++ b/src/src/daemon.c @@ -59,7 +59,6 @@ Returns: nothing static void sighup_handler(int sig) { -sig = sig; /* Keep picky compilers happy */ sighup_seen = TRUE; signal(SIGHUP, sighup_handler); } @@ -83,7 +82,6 @@ Returns: nothing static void main_sigchld_handler(int sig) { -sig = sig; /* Keep picky compilers happy */ os_non_restarting_signal(SIGCHLD, SIG_DFL); sigchld_seen = TRUE; } diff --git a/src/src/dbstuff.h b/src/src/dbstuff.h index c1fb54346..5a8441d6a 100644 --- a/src/src/dbstuff.h +++ b/src/src/dbstuff.h @@ -436,9 +436,8 @@ before been able to pass successfully. */ #define EXIM_DBSCAN(db, key, data, first, cursor) \ ((db)->seq(db, &key, &data, (first? R_FIRST : R_NEXT)) == 0) -/* EXIM_DBDELETE_CURSOR - terminate scanning operation (null). Make it -refer to cursor, to keep picky compilers happy. */ -#define EXIM_DBDELETE_CURSOR(cursor) { cursor = cursor; } +/* EXIM_DBDELETE_CURSOR - terminate scanning operation (null). */ +#define EXIM_DBDELETE_CURSOR(cursor) { } /* EXIM_DBCLOSE */ #define EXIM_DBCLOSE__(db) (db)->close(db) @@ -524,9 +523,8 @@ typedef struct { (((db)->lkey.dptr != NULL)? (free((db)->lkey.dptr),1) : 1),\ db->lkey = key, key.dptr != NULL) -/* EXIM_DBDELETE_CURSOR - terminate scanning operation (null). Make it -refer to cursor, to keep picky compilers happy. */ -#define EXIM_DBDELETE_CURSOR(cursor) { cursor = cursor; } +/* EXIM_DBDELETE_CURSOR - terminate scanning operation (null). */ +#define EXIM_DBDELETE_CURSOR(cursor) { } /* EXIM_DBCLOSE */ #define EXIM_DBCLOSE__(db) \ @@ -602,9 +600,8 @@ interface */ #define EXIM_DBSCAN(db, key, data, first, cursor) \ (key = (first? dbm_firstkey(db) : dbm_nextkey(db)), key.dptr != NULL) -/* EXIM_DBDELETE_CURSOR - terminate scanning operation (null). Make it -refer to cursor, to keep picky compilers happy. */ -#define EXIM_DBDELETE_CURSOR(cursor) { cursor = cursor; } +/* EXIM_DBDELETE_CURSOR - terminate scanning operation (null). */ +#define EXIM_DBDELETE_CURSOR(cursor) { } /* EXIM_DBCLOSE */ #define EXIM_DBCLOSE__(db) dbm_close(db) diff --git a/src/src/dummies.c b/src/src/dummies.c index 197415f0c..598117fcf 100644 --- a/src/src/dummies.c +++ b/src/src/dummies.c @@ -47,8 +47,6 @@ va_start(ap, format); vfprintf(stderr, format, ap); fprintf(stderr, "\n"); va_end(ap); -selector = selector; /* Keep picky compilers happy */ -flags = flags; } @@ -103,7 +101,6 @@ extern int sigalrm_seen; void sigalrm_handler(int sig) { -sig = sig; /* Keep picky compilers happy */ sigalrm_seen = TRUE; } @@ -116,19 +113,12 @@ sigalrm_seen = TRUE; int header_checkname(void *h, char *name, int len) { -h = h; /* Keep picky compilers happy */ -name = name; -len = len; return 0; } void directory_make(char *parent, char *name, int mode, int panic) { -parent = parent; /* Keep picky compilers happy */ -name = name; -mode = mode; -panic = panic; } void @@ -140,10 +130,6 @@ host_build_sender_fullhost(void) { } char * host_ntoa(int type, const void *arg, char *buffer, int *portptr) { -type = type; /* Keep picky compilers happy */ -arg = arg; -buffer = buffer; -portptr = portptr; return NULL; } #endif diff --git a/src/src/exim.c b/src/src/exim.c index 0b7b87ed5..dcfc06623 100644 --- a/src/src/exim.c +++ b/src/src/exim.c @@ -279,7 +279,6 @@ Returns: nothing void sigalrm_handler(int sig) { -sig = sig; /* Keep picky compilers happy */ sigalrm_seen = TRUE; os_non_restarting_signal(SIGALRM, sigalrm_handler); } diff --git a/src/src/exim_dbutil.c b/src/src/exim_dbutil.c index 5c7b6650e..8513bc0c7 100644 --- a/src/src/exim_dbutil.c +++ b/src/src/exim_dbutil.c @@ -106,7 +106,6 @@ SIGNAL_BOOL sigalrm_seen; void sigalrm_handler(int sig) { -sig = sig; /* Keep picky compilers happy */ sigalrm_seen = 1; } @@ -177,8 +176,6 @@ va_start(ap, format); vfprintf(stderr, format, ap); fprintf(stderr, "\n"); va_end(ap); -selector = selector; /* Keep picky compilers happy */ -flags = flags; } diff --git a/src/src/exim_lock.c b/src/src/exim_lock.c index 2624aff5e..dbdd97129 100644 --- a/src/src/exim_lock.c +++ b/src/src/exim_lock.c @@ -87,7 +87,6 @@ the other stuff in os.c, so force the other macros to omit it. */ static void sigalrm_handler(int sig) { -sig = sig; /* Keep picky compilers happy */ sigalrm_seen = TRUE; } diff --git a/src/src/local_scan.c b/src/src/local_scan.c index 4dd0b2baa..2032ae70d 100644 --- a/src/src/local_scan.c +++ b/src/src/local_scan.c @@ -57,8 +57,6 @@ The return values of this function are: int local_scan(int fd, uschar **return_text) { -fd = fd; /* Keep picky compilers happy */ -return_text = return_text; return LOCAL_SCAN_ACCEPT; } diff --git a/src/src/lookups/cdb.c b/src/src/lookups/cdb.c index 3a95f8ed0..e0faa905d 100644 --- a/src/src/lookups/cdb.c +++ b/src/src/lookups/cdb.c @@ -281,9 +281,6 @@ hash_offset, hash_offlen, hash_slotnm; -/* Keep picky compilers happy */ -do_cache = do_cache; - key_hash = cdb_hash(keystring, key_len); hash_offset_entry = CDB_HASH_ENTRY * (key_hash & CDB_HASH_MASK); diff --git a/src/src/lookups/dbmdb.c b/src/src/lookups/dbmdb.c index 98ce74fd4..0cec73273 100644 --- a/src/src/lookups/dbmdb.c +++ b/src/src/lookups/dbmdb.c @@ -52,7 +52,6 @@ dbmdb_check(void *handle, const uschar *filename, int modemask, uid_t *owners, gid_t *owngroups, uschar **errmsg) { int rc; -handle = handle; /* Keep picky compilers happy */ #if defined(USE_DB) || defined(USE_TDB) || defined(USE_GDBM) rc = lf_check_file(-1, filename, S_IFREG, modemask, owners, owngroups, @@ -98,10 +97,6 @@ dbmdb_find(void * handle, const uschar * filename, const uschar * keystring, EXIM_DB *d = (EXIM_DB *)handle; EXIM_DATUM key, data; -filename = filename; /* Keep picky compilers happy */ -errmsg = errmsg; -do_cache = do_cache; - EXIM_DATUM_INIT(key); /* Some DBM libraries require datums to */ EXIM_DATUM_INIT(data); /* be cleared before use. */ EXIM_DATUM_DATA(key) = CS keystring; diff --git a/src/src/lookups/dnsdb.c b/src/src/lookups/dnsdb.c index 1985964da..d06482143 100644 --- a/src/src/lookups/dnsdb.c +++ b/src/src/lookups/dnsdb.c @@ -80,8 +80,6 @@ static int type_values[] = { static void * dnsdb_open(const uschar * filename, uschar **errmsg) { -filename = filename; /* Keep picky compilers happy */ -errmsg = errmsg; /* Ditto */ return (void *)(-1); /* Any non-0 value */ } @@ -155,11 +153,6 @@ store as possible later, so we preallocate the result here */ gstring * yield = string_get(256); -handle = handle; /* Keep picky compilers happy */ -filename = filename; -length = length; -do_cache = do_cache; - /* If the string starts with '>' we change the output separator. If it's followed by ';' or ',' we set the TXT output separator. */ diff --git a/src/src/lookups/dsearch.c b/src/src/lookups/dsearch.c index 501293ac0..76f52774b 100644 --- a/src/src/lookups/dsearch.c +++ b/src/src/lookups/dsearch.c @@ -86,10 +86,6 @@ int save_errno; uschar * filename; unsigned flags = 0; -handle = handle; /* Keep picky compilers happy */ -length = length; -do_cache = do_cache; - if (Ustrchr(keystring, '/') != 0) { *errmsg = string_sprintf("key for dsearch lookup contains a slash: %s", diff --git a/src/src/lookups/ibase.c b/src/src/lookups/ibase.c index 34a714dc3..4789b6cb7 100644 --- a/src/src/lookups/ibase.c +++ b/src/src/lookups/ibase.c @@ -459,9 +459,6 @@ uschar *server; uschar *list = ibase_servers; uschar buffer[512]; -/* Keep picky compilers happy */ -do_cache = do_cache; - DEBUG(D_lookup) debug_printf_indent("Interbase query: %s\n", query); while ((server = string_nextinlist(&list, &sep, buffer, sizeof(buffer)))) diff --git a/src/src/lookups/json.c b/src/src/lookups/json.c index 0aaaba7f5..1a2ca0449 100644 --- a/src/src/lookups/json.c +++ b/src/src/lookups/json.c @@ -89,9 +89,6 @@ json_error_t jerr; uschar * key; int sep = 0; -length = length; /* Keep picky compilers happy */ -do_cache = do_cache; /* Keep picky compilers happy */ - rewind(f); if (!(j = json_loadf(f, 0, &jerr))) { diff --git a/src/src/lookups/ldap.c b/src/src/lookups/ldap.c index 3fced1cbd..e2dbe5162 100644 --- a/src/src/lookups/ldap.c +++ b/src/src/lookups/ldap.c @@ -1288,8 +1288,6 @@ eldap_find(void * handle, const uschar * filename, const uschar * ldap_url, int length, uschar ** result, uschar ** errmsg, uint * do_cache, const uschar * opts) { -/* Keep picky compilers happy */ -do_cache = do_cache; return(control_ldap_search(ldap_url, SEARCH_LDAP_SINGLE, result, errmsg)); } @@ -1298,8 +1296,6 @@ eldapm_find(void * handle, const uschar * filename, const uschar * ldap_url, int length, uschar ** result, uschar ** errmsg, uint * do_cache, const uschar * opts) { -/* Keep picky compilers happy */ -do_cache = do_cache; return(control_ldap_search(ldap_url, SEARCH_LDAP_MULTIPLE, result, errmsg)); } @@ -1308,8 +1304,6 @@ eldapdn_find(void * handle, const uschar * filename, const uschar * ldap_url, int length, uschar ** result, uschar ** errmsg, uint * do_cache, const uschar * opts) { -/* Keep picky compilers happy */ -do_cache = do_cache; return(control_ldap_search(ldap_url, SEARCH_LDAP_DN, result, errmsg)); } @@ -1317,8 +1311,6 @@ int eldapauth_find(void * handle, const uschar * filename, const uschar * ldap_url, int length, uschar ** result, uschar ** errmsg, uint * do_cache) { -/* Keep picky compilers happy */ -do_cache = do_cache; return(control_ldap_search(ldap_url, SEARCH_LDAP_AUTH, result, errmsg)); } diff --git a/src/src/lookups/lsearch.c b/src/src/lookups/lsearch.c index ae9df3551..b78e858c3 100644 --- a/src/src/lookups/lsearch.c +++ b/src/src/lookups/lsearch.c @@ -95,9 +95,6 @@ if(type == LSEARCH_WILD || type == LSEARCH_NWILD) reset_point = store_mark(); } -filename = filename; /* Keep picky compilers happy */ -errmsg = errmsg; - rewind(f); for (last_was_eol = TRUE; Ufgets(buffer, sizeof(buffer), f) != NULL; @@ -324,7 +321,6 @@ lsearch_find(void * handle, const uschar * filename, const uschar * keystring, int length, uschar ** result, uschar ** errmsg, uint * do_cache, const uschar * opts) { -do_cache = do_cache; /* Keep picky compilers happy */ return internal_lsearch_find(handle, filename, keystring, length, result, errmsg, LSEARCH_PLAIN); } @@ -342,7 +338,6 @@ wildlsearch_find(void * handle, const uschar * filename, const uschar * keystrin int length, uschar ** result, uschar ** errmsg, uint * do_cache, const uschar * opts) { -do_cache = do_cache; /* Keep picky compilers happy */ return internal_lsearch_find(handle, filename, keystring, length, result, errmsg, LSEARCH_WILD); } @@ -360,7 +355,6 @@ nwildlsearch_find(void * handle, const uschar * filename, const uschar * keystri int length, uschar ** result, uschar ** errmsg, uint * do_cache, const uschar * opts) { -do_cache = do_cache; /* Keep picky compilers happy */ return internal_lsearch_find(handle, filename, keystring, length, result, errmsg, LSEARCH_NWILD); } @@ -379,8 +373,6 @@ iplsearch_find(void * handle, uschar const * filename, const uschar * keystring, int length, uschar ** result, uschar ** errmsg, uint * do_cache, const uschar * opts) { -do_cache = do_cache; /* Keep picky compilers happy */ - if ((length == 1 && keystring[0] == '*') || string_is_ip_address(keystring, NULL) != 0) return internal_lsearch_find(handle, filename, keystring, length, result, diff --git a/src/src/lookups/passwd.c b/src/src/lookups/passwd.c index 641a9438c..5578d58dd 100644 --- a/src/src/lookups/passwd.c +++ b/src/src/lookups/passwd.c @@ -19,8 +19,6 @@ static void * passwd_open(const uschar * filename, uschar ** errmsg) { -filename = filename; /* Keep picky compilers happy */ -errmsg = errmsg; return (void *)(-1); /* Just return something non-null */ } @@ -40,12 +38,6 @@ passwd_find(void * handle, const uschar * filename, const uschar * keystring, { struct passwd *pw; -handle = handle; /* Keep picky compilers happy */ -filename = filename; -length = length; -errmsg = errmsg; -do_cache = do_cache; - if (!route_finduser(keystring, &pw, NULL)) return FAIL; *result = string_sprintf("*:%d:%d:%s:%s:%s", (int)pw->pw_uid, (int)pw->pw_gid, pw->pw_gecos, pw->pw_dir, pw->pw_shell); diff --git a/src/src/lookups/testdb.c b/src/src/lookups/testdb.c index 5742485c8..3ecd10401 100644 --- a/src/src/lookups/testdb.c +++ b/src/src/lookups/testdb.c @@ -24,8 +24,6 @@ the find function. */ static void * testdb_open(const uschar * filename, uschar ** errmsg) { -filename = filename; /* Keep picky compilers happy */ -errmsg = errmsg; return (void *)(1); /* Just return something non-null */ } @@ -42,10 +40,6 @@ testdb_find(void * handle, const uschar * filename, const uschar * query, int length, uschar ** result, uschar ** errmsg, uint * do_cache, const uschar * opts) { -handle = handle; /* Keep picky compilers happy */ -filename = filename; -length = length; - if (Ustrcmp(query, "fail") == 0) { *errmsg = US"testdb lookup forced FAIL"; diff --git a/src/src/lookups/whoson.c b/src/src/lookups/whoson.c index b4e64d2a8..2260788a7 100644 --- a/src/src/lookups/whoson.c +++ b/src/src/lookups/whoson.c @@ -23,8 +23,6 @@ static void * whoson_open(const uschar * filename, uschar ** errmsg) { -filename = filename; /* Keep picky compilers happy */ -errmsg = errmsg; return (void *)(1); /* Just return something non-null */ } @@ -40,11 +38,6 @@ whoson_find(void * handle, const uschar * filename, uschar * query, int length, uschar ** result, uschar ** errmsg, uint * do_cache, const uschar * opts) { uschar buffer[80]; -handle = handle; /* Keep picky compilers happy */ -filename = filename; -length = length; -errmsg = errmsg; -do_cache = do_cache; switch (wso_query(CS query, CS buffer, sizeof(buffer))) { diff --git a/src/src/routers/accept.c b/src/src/routers/accept.c index 3cb43b618..b02ceda7a 100644 --- a/src/src/routers/accept.c +++ b/src/src/routers/accept.c @@ -107,9 +107,6 @@ uschar *errors_to; uschar *remove_headers; header_line *extra_headers; -addr_new = addr_new; /* Keep picky compilers happy */ -addr_succeed = addr_succeed; - DEBUG(D_route) debug_printf("%s router called for %s\n domain = %s\n", rblock->name, addr->address, addr->domain); diff --git a/src/src/routers/dnslookup.c b/src/src/routers/dnslookup.c index abc41a345..a836c6147 100644 --- a/src/src/routers/dnslookup.c +++ b/src/src/routers/dnslookup.c @@ -160,9 +160,6 @@ const uschar *fully_qualified_name; const uschar *listptr; uschar widen_buffer[256]; -addr_new = addr_new; /* Keep picky compilers happy */ -addr_succeed = addr_succeed; - DEBUG(D_route) debug_printf("%s router called for %s\n domain = %s\n", rblock->name, addr->address, addr->domain); diff --git a/src/src/routers/ipliteral.c b/src/src/routers/ipliteral.c index 0c1367306..f0b3b193f 100644 --- a/src/src/routers/ipliteral.c +++ b/src/src/routers/ipliteral.c @@ -116,9 +116,6 @@ const uschar *ip; int len = Ustrlen(domain); int rc, ipv; -addr_new = addr_new; /* Keep picky compilers happy */ -addr_succeed = addr_succeed; - DEBUG(D_route) debug_printf("%s router called for %s: domain = %s\n", rblock->name, addr->address, addr->domain); diff --git a/src/src/routers/iplookup.c b/src/src/routers/iplookup.c index 02b43ee91..4412c625e 100644 --- a/src/src/routers/iplookup.c +++ b/src/src/routers/iplookup.c @@ -169,11 +169,6 @@ const pcre *re = ob->re_response_pattern; int count, query_len, rc; int sep = 0; -addr_local = addr_local; /* Keep picky compilers happy */ -addr_remote = addr_remote; -addr_succeed = addr_succeed; -pw = pw; - DEBUG(D_route) debug_printf("%s router called for %s: domain = %s\n", rblock->name, addr->address, addr->domain); diff --git a/src/src/routers/manualroute.c b/src/src/routers/manualroute.c index e0a180e62..471b38566 100644 --- a/src/src/routers/manualroute.c +++ b/src/src/routers/manualroute.c @@ -248,9 +248,6 @@ transport_instance *transport = NULL; BOOL individual_transport_set = FALSE; BOOL randomize = ob->hosts_randomize; -addr_new = addr_new; /* Keep picky compilers happy */ -addr_succeed = addr_succeed; - DEBUG(D_route) debug_printf("%s router called for %s\n domain = %s\n", rblock->name, addr->address, addr->domain); diff --git a/src/src/routers/redirect.c b/src/src/routers/redirect.c index 13b6e5244..0090ddaed 100644 --- a/src/src/routers/redirect.c +++ b/src/src/routers/redirect.c @@ -529,9 +529,6 @@ int options = ob->bit_options; int frc = 0; int xrc = 0; -addr_local = addr_local; /* Keep picky compilers happy */ -addr_remote = addr_remote; - /* Initialize the data to be propagated to the children */ addr_prop.address_data = deliver_address_data; diff --git a/src/src/sieve.c b/src/src/sieve.c index 18aa3e609..42f2668c3 100644 --- a/src/src/sieve.c +++ b/src/src/sieve.c @@ -3573,9 +3573,6 @@ struct Sieve sieve; int r; uschar *msg; -options = options; /* Keep picky compilers happy */ -error = error; - DEBUG(D_route) debug_printf("Sieve: start of processing\n"); sieve.filter = filter; diff --git a/src/src/store.c b/src/src/store.c index c460ba383..47d6f9106 100644 --- a/src/src/store.c +++ b/src/src/store.c @@ -301,10 +301,7 @@ store_last_get[pool] = next_yield[pool]; /* Cut out the debugging stuff for utilities, but stop picky compilers from giving warnings. */ -#ifdef COMPILE_UTILITY -func = func; -linenumber = linenumber; -#else +#ifndef COMPILE_UTILITY DEBUG(D_memory) debug_printf("---%d Get %6p %5d %-14s %4d\n", pool, store_last_get[pool], size, func, linenumber); @@ -395,10 +392,7 @@ if (CS ptr + rounded_oldsize != CS (next_yield[pool]) || /* Cut out the debugging stuff for utilities, but stop picky compilers from giving warnings. */ -#ifdef COMPILE_UTILITY -func = func; -linenumber = linenumber; -#else +#ifndef COMPILE_UTILITY DEBUG(D_memory) debug_printf("---%d Ext %6p %5d %-14s %4d\n", pool, ptr, newsize, func, linenumber); @@ -522,10 +516,7 @@ while ((b = bb)) /* Cut out the debugging stuff for utilities, but stop picky compilers from giving warnings. */ -#ifdef COMPILE_UTILITY -func = func; -linenumber = linenumber; -#else +#ifndef COMPILE_UTILITY DEBUG(D_memory) debug_printf("---%d Rst %6p %5d %-14s %4d %d\n", pool, ptr, count + oldmalloc - pool_malloc, @@ -609,10 +600,7 @@ for (int pool = 0; pool < nelem(current_block); pool++) /* Cut out the debugging stuff for utilities, but stop picky compilers from giving warnings. */ -#ifdef COMPILE_UTILITY - func = func; - linenumber = linenumber; -#else +#ifndef COMPILE_UTILITY DEBUG(D_memory) debug_printf("---%d Rel %6p %5d %-14s %4d %d\n", pool, ptr, count, func, linenumber, pool_malloc); @@ -683,10 +671,7 @@ for (storeblock * b = chainbase[pool]; b; b = b->next) /* Cut out the debugging stuff for utilities, but stop picky compilers from giving warnings. */ -#ifdef COMPILE_UTILITY - func = func; - linenumber = linenumber; -#else +#ifndef COMPILE_UTILITY DEBUG(D_memory) debug_printf("-Release %6p %-20s %4d %d\n", (void *)bb, func, linenumber, pool_malloc); @@ -781,10 +766,7 @@ if ((nonpool_malloc += size) > max_nonpool_malloc) /* Cut out the debugging stuff for utilities, but stop picky compilers from giving warnings. */ -#ifdef COMPILE_UTILITY -func = func; line = line; -#else - +#ifndef COMPILE_UTILITY /* If running in test harness, spend time making sure all the new store is not filled with zeros so as to catch problems. */ @@ -823,10 +805,7 @@ Returns: nothing static void internal_store_free(void * block, const char * func, int linenumber) { -#ifdef COMPILE_UTILITY -func = func; -linenumber = linenumber; -#else +#ifndef COMPILE_UTILITY DEBUG(D_memory) debug_printf("----Free %6p %-20s %4d\n", block, func, linenumber); #endif /* COMPILE_UTILITY */ diff --git a/src/src/transports/appendfile.c b/src/src/transports/appendfile.c index c8c0a58b6..8ef1a564e 100644 --- a/src/src/transports/appendfile.c +++ b/src/src/transports/appendfile.c @@ -226,11 +226,6 @@ appendfile_transport_options_block *ob = uschar *q = ob->quota; double default_value = 0.0; -addrlist = addrlist; /* Keep picky compilers happy */ -dummy = dummy; -uid = uid; -gid = gid; - if (ob->expand_maildir_use_size_file) ob->maildir_use_size_file = expand_check_condition(ob->expand_maildir_use_size_file, US"`maildir_use_size_file` in transport", tblock->name); diff --git a/src/src/transports/smtp.c b/src/src/transports/smtp.c index 3d41a6767..0f3ade9fd 100644 --- a/src/src/transports/smtp.c +++ b/src/src/transports/smtp.c @@ -364,10 +364,6 @@ smtp_transport_setup(transport_instance *tblock, address_item *addrlist, { smtp_transport_options_block *ob = SOB tblock->options_block; -errmsg = errmsg; /* Keep picky compilers happy */ -uid = uid; -gid = gid; - /* Pass back options if required. This interface is getting very messy. */ if (tf)