#endif
if (rn->nsrvs) {
- for (i = 0; i < rn->nsrvs; i++) {
+ for (i = 0; i < (ngx_uint_t) rn->nsrvs; i++) {
if (rn->u.srvs[i].name.data) {
ngx_resolver_free_locked(r, rn->u.srvs[i].name.data);
}
ngx_del_timer(ctx->event);
}
- for (i = 0; i < rn->nsrvs; i++) {
+ for (i = 0; i < (ngx_uint_t) rn->nsrvs; i++) {
srvs[i].name.data = ngx_resolver_alloc(r, rn->u.srvs[i].name.len);
if (srvs[i].name.data == NULL) {
goto failed;
#endif
if (rn->nsrvs) {
- for (i = 0; i < rn->nsrvs; i++) {
+ for (i = 0; i < (ngx_uint_t) rn->nsrvs; i++) {
if (rn->u.srvs[i].name.data) {
ngx_resolver_free_locked(r, rn->u.srvs[i].name.data);
}
d = 0;
}
- if (j == rn->naddrs) {
+ if (j == (ngx_uint_t) rn->naddrs) {
j = 0;
}
- } while (++i < rn->naddrs);
+ } while (++i < (ngx_uint_t) rn->naddrs);
}
#if (NGX_HAVE_INET6)
start = offset - (ngx_int_t) tables->min_match_len + 1;
- i = ngx_max(tables->index[c], ctx->index);
+ i = ngx_max((ngx_uint_t) tables->index[c], ctx->index);
j = tables->index[c + 1];
while (i != j) {
}
c = match[i].match.data[tables->min_match_len - 1];
- while (ch <= c) {
+ while (ch <= (ngx_uint_t) c) {
tables->index[ch++] = (u_char) i;
}
}
return NGX_DECLINED;
}
- if (h->crc32 != c->crc32 || h->header_start != c->header_start) {
+ if (h->crc32 != c->crc32 || (size_t) h->header_start != c->header_start) {
ngx_log_error(NGX_LOG_CRIT, r->connection->log, 0,
"cache file \"%s\" has md5 collision", c->file.name.data);
return NGX_DECLINED;
if (h.version != NGX_HTTP_CACHE_VERSION
|| h.last_modified != c->last_modified
|| h.crc32 != c->crc32
- || h.header_start != c->header_start
- || h.body_start != c->body_start)
+ || (size_t) h.header_start != c->header_start
+ || (size_t) h.body_start != c->body_start)
{
ngx_log_debug1(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
"http file cache \"%s\" content changed",
p = ngx_cpymem(p, conf->capability.data, conf->capability.len);
- p = ngx_cpymem(p, "250 STARTTLS" CRLF, sizeof("250 STARTTLS" CRLF) - 1);
+ ngx_memcpy(p, "250 STARTTLS" CRLF, sizeof("250 STARTTLS" CRLF) - 1);
p = conf->starttls_capability.data
+ (last - conf->capability.data) + 3;
/* unreferenced formal parameter */
#pragma warn -8057
+/* suspicious pointer arithmetic */
+#pragma warn -8072
+
#endif