Skip to content

Commit

Permalink
fix issue #13 compile time warnings with over-strict GCC
Browse files Browse the repository at this point in the history
  • Loading branch information
tony2001 committed Apr 22, 2019
1 parent be0a9a3 commit c67c27c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ngx_http_pinba_module.c
Expand Up @@ -760,7 +760,7 @@ static char *ngx_http_pinba_server(ngx_conf_t *cf, ngx_command_t *cmd, void *con
ngx_url_t *up;
ngx_http_pinba_loc_conf_t *lcf = conf;
int res;
int i;
ngx_uint_t i;
ngx_pinba_socket_t *sock;

if (lcf->servers == NULL) {
Expand Down Expand Up @@ -928,7 +928,7 @@ static ngx_int_t ngx_http_pinba_handler(ngx_http_request_t *r) /* {{{ */
ngx_pinba_socket_t *sock;
ngx_pinba_socket_t **sockp = NULL;

server = lcf->servers->elts + lcf->servers->size * i;
server = (ngx_url_t *)lcf->servers->elts + lcf->servers->size * i;

res = ngx_http_pinba_resolve_and_open_socket(r, NULL, &server->host, &server->port_text, lcf->resolve_freq, &sock);
if (res < 0) {
Expand Down Expand Up @@ -1223,7 +1223,7 @@ static ngx_int_t ngx_http_pinba_handler(ngx_http_request_t *r) /* {{{ */
}

for (i = 0; i < socks->nelts; i++) {
ngx_pinba_socket_t **sock = socks->elts + socks->size * i;
ngx_pinba_socket_t **sock = (ngx_pinba_socket_t **)socks->elts + socks->size * i;
ngx_http_pinba_send_data(r, *sock, request, 0);
}

Expand Down

0 comments on commit c67c27c

Please sign in to comment.