# arch-tag: automatic-ChangeLog--srvx@srvx.net--2005-srvx/srvx--devo--1.3
#
+2005-10-07 02:51:12 GMT Michael Poole <mdpoole@troilus.org> patch-27
+
+ Summary:
+ Fix compiler warnings on AMD64 Linux.
+ Revision:
+ srvx--devo--1.3--patch-27
+
+ src/gline.c (gline_alternate_target): Typecast format field precision
+ argument.
+
+ src/helpfile.c (helpfile_eval_identifier): Likewise.
+ (helpfile_eval_atomicexpr): Likewise.
+ (helpfile_eval_expr): Likewise.
+ (helpfile_eval_condition): Likewise.
+
+ src/log.c (log_audit): Change typecast used to make types compatible.
+
+ src/main.c (set_item_rlimit): Use long instead of int as contained value.
+
+ src/sendmail.c (send_flowed_text): Typecast format field precision
+ argument.
+
+ modified files:
+ ChangeLog src/gline.c src/helpfile.c src/log.c src/main.c
+ src/sendmail.c
+
+
2005-08-14 01:34:04 GMT Michael Poole <mdpoole@troilus.org> patch-26
Summary:
if (inet_aton(hostname+1, &in)
&& (he = gethostbyaddr((char*)&in, sizeof(in), AF_INET))) {
res = malloc((hostname - target) + 2 + strlen(he->h_name));
- sprintf(res, "%.*s@%s", hostname - target, target, he->h_name);
+ sprintf(res, "%.*s@%s", (int)(hostname - target), target, he->h_name);
return res;
} else
return NULL;
} else if (getipbyname(hostname+1, &ip)) {
res = malloc((hostname - target) + 18);
- sprintf(res, "%.*s@%lu.%lu.%lu.%lu", hostname - target, target, ip & 255, (ip >> 8) & 255, (ip >> 16) & 255, (ip >> 24) & 255);
+ sprintf(res, "%.*s@%lu.%lu.%lu.%lu", (int)(hostname - target), target, ip & 255, (ip >> 8) & 255, (ip >> 16) & 255, (ip >> 24) & 255);
return res;
} else
return NULL;
*end = start + 5;
return 0;
} else {
- log_module(MAIN_LOG, LOG_FATAL, "Unexpected helpfile identifier '%.*s'.", *end-start, start);
+ log_module(MAIN_LOG, LOG_FATAL, "Unexpected helpfile identifier '%.*s'.", (int)(*end-start), start);
return -1;
}
}
while (isspace(*sep) && (sep < *end))
sep++;
if ((sep == *end) || (sep[0] != ')')) {
- log_module(MAIN_LOG, LOG_FATAL, "Expected close parenthesis at '%.*s'.", *end-sep, sep);
+ log_module(MAIN_LOG, LOG_FATAL, "Expected close parenthesis at '%.*s'.", (int)(*end-sep), sep);
return -1;
}
sep += len;
}
if (op == OP_INVALID) {
- log_module(MAIN_LOG, LOG_FATAL, "Unrecognized helpfile operator at '%.*s'.", *end-sep, sep);
+ log_module(MAIN_LOG, LOG_FATAL, "Unrecognized helpfile operator at '%.*s'.", (int)(*end-sep), sep);
return -1;
}
while (isspace(*sep2) && (sep2 < *end))
sep2++;
if (sep2 != *end) {
- log_module(MAIN_LOG, LOG_FATAL, "Trailing garbage in helpfile expression: '%.*s'.", *end-sep2, sep2);
+ log_module(MAIN_LOG, LOG_FATAL, "Trailing garbage in helpfile expression: '%.*s'.", (int)(*end-sep2), sep2);
return -1;
}
for (term = start; isalnum(*term) && (term < *end); ++term) ;
if (term != start) {
if ((term + 2 >= *end) || (term[0] != ':') || (term[1] != ' ')) {
- log_module(MAIN_LOG, LOG_FATAL, "In helpfile condition '%.*s' expected prefix to end with ': '.", *end-start, start);
+ log_module(MAIN_LOG, LOG_FATAL, "In helpfile condition '%.*s' expected prefix to end with ': '.", (int)(*end-start), start);
return -1;
}
start = term + 2;
/* remove old elements from the linked list */
while (type->log_count > type->max_count)
log_type_free_oldest(type);
- while (type->log_oldest && (type->log_oldest->time + type->max_age < (unsigned long)now))
+ while (type->log_oldest && (type->log_oldest->time + (time_t)type->max_age < now))
log_type_free_oldest(type);
if (type->log_oldest)
type->log_oldest->prev = 0;
static int
set_item_rlimit(const char *name, void *data, void *extra)
{
- int rsrc, found;
+ long rsrc;
+ int found;
struct record_data *rd = data;
struct rlimit rlim;
const char *str;
- rsrc = (int)dict_find(extra, name, &found);
+ rsrc = (long)dict_find(extra, name, &found);
if (!found) {
log_module(MAIN_LOG, LOG_ERROR, "Invalid rlimit \"%s\" in rlimits section.", name);
return 0;
break;
} else if (eol && (eol < para + (80 - shift))) {
/* Newline inside paragraph, no need to wrap. */
- fprintf(where, "%.*s\n", eol - para, para);
+ fprintf(where, "%.*s\n", (int)(eol - para), para);
para = eol + 1;
} else {
int pos;