The rash of output from -Wself-assign on Darwin demonstrates just how pointless this war is
vfprintf(stderr, format, ap);
fprintf(stderr, "\n");
va_end(ap);
-selector = selector; /* Keep picky compilers happy */
-flags = flags;
}
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;
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;
{
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);
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);
}
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);
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
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,
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"");
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;
break;
}
-if (f == NULL)
+if (!f)
text_showf(text, "Failed to open file: %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"");
}
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"");
}
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"");
}
{
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;
}
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";
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";
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"");
}
{
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);
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"");
}
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"");
}
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. */
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 */
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);
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;
- }
}
<BtnUp>: 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);
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;
}
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;
}
static void
sighup_handler(int sig)
{
-sig = sig; /* Keep picky compilers happy */
sighup_seen = TRUE;
signal(SIGHUP, sighup_handler);
}
static void
main_sigchld_handler(int sig)
{
-sig = sig; /* Keep picky compilers happy */
os_non_restarting_signal(SIGCHLD, SIG_DFL);
sigchld_seen = TRUE;
}
#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)
(((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) \
#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)
vfprintf(stderr, format, ap);
fprintf(stderr, "\n");
va_end(ap);
-selector = selector; /* Keep picky compilers happy */
-flags = flags;
}
void
sigalrm_handler(int sig)
{
-sig = sig; /* Keep picky compilers happy */
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
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
void
sigalrm_handler(int sig)
{
-sig = sig; /* Keep picky compilers happy */
sigalrm_seen = TRUE;
os_non_restarting_signal(SIGALRM, sigalrm_handler);
}
void
sigalrm_handler(int sig)
{
-sig = sig; /* Keep picky compilers happy */
sigalrm_seen = 1;
}
vfprintf(stderr, format, ap);
fprintf(stderr, "\n");
va_end(ap);
-selector = selector; /* Keep picky compilers happy */
-flags = flags;
}
static void
sigalrm_handler(int sig)
{
-sig = sig; /* Keep picky compilers happy */
sigalrm_seen = TRUE;
}
int
local_scan(int fd, uschar **return_text)
{
-fd = fd; /* Keep picky compilers happy */
-return_text = return_text;
return LOCAL_SCAN_ACCEPT;
}
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);
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,
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;
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 */
}
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. */
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",
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))))
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)))
{
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));
}
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));
}
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));
}
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));
}
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;
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);
}
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);
}
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);
}
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,
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 */
}
{
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);
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 */
}
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";
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 */
}
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)))
{
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);
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);
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);
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);
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);
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;
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;
/* 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);
/* 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);
/* 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,
/* 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);
/* 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);
/* 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. */
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 */
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);
{
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)