Changeset 2060

Show
Ignore:
Timestamp:
01/18/2008 03:19:01 PM (4 months ago)
Author:
glen
Message:

- fix printf format warnings. Stefan Buhler

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/src/connections.c

    r2047 r2060  
    13391339                                         
    13401340                                        if (cq_len > 0) { 
    1341                                                 TRACE("filter[%d] is not empty: %lld (report me)", f->id); 
     1341                                                TRACE("filter[%d] is not empty: %lld (report me)", f->id, cq_len); 
    13421342                                        } 
    13431343                                } 
  • trunk/src/http_req.c

    r2011 r2060  
    185185                                t->offset == t->lookup_offset + 1) { 
    186186 
    187                                 ERROR("invalid char (%d) at pos: %d", t->c, t->offset); 
     187                                ERROR("invalid char (%d) at pos: %d", c, t->offset); 
    188188                                return PARSER_ERROR; 
    189189                        } 
  • trunk/src/mod_chunked.c

    r2033 r2060  
    203203        } 
    204204        if(con->response.content_length >= 0) { 
    205                 if (p->conf.debug > 0) TRACE("response content length known, disabling chunked encoding.  len=%d", con->response.content_length); 
     205                if (p->conf.debug > 0) TRACE("response content length known, disabling chunked encoding.  len=%ju", con->response.content_length); 
    206206                use_chunked = 0; 
    207207        } else if (con->request.http_method != HTTP_METHOD_HEAD) { 
  • trunk/src/mod_compress.c

    r1800 r2060  
    650650        /* don't compress files that are too large as we need to much time to handle them */ 
    651651        if (max_fsize && (sce->st.st_size >> 10) > max_fsize) { 
    652                 if (con->conf.log_request_handling) TRACE("file '%s' is too large: %lu",  
     652                if (con->conf.log_request_handling) TRACE("file '%s' is too large: %ju",  
    653653                                BUF_STR(con->physical.path),  
    654654                                sce->st.st_size); 
     
    659659        /* compressing the file might lead to larger files instead */ 
    660660        if (sce->st.st_size < 128) { 
    661                 if (con->conf.log_request_handling) TRACE("file '%s' is too small: %lu",  
     661                if (con->conf.log_request_handling) TRACE("file '%s' is too small: %ju",  
    662662                                BUF_STR(con->physical.path),  
    663663                                sce->st.st_size); 
     
    693693 
    694694        if (con->send->first == NULL) { 
    695                 if (con->conf.log_request_handling) TRACE("we can't compress streams: ->first = %p", con->send->first); 
     695                if (con->conf.log_request_handling) TRACE("we can't compress streams: ->first = %p", NULL); 
    696696                return HANDLER_GO_ON; 
    697697        } 
    698698 
    699699        if (con->send->first->next != NULL) { 
    700                 if (con->conf.log_request_handling) TRACE("we can't compress streams: ->first->next = %p", con->send->first->next); 
     700                if (con->conf.log_request_handling) TRACE("we can't compress streams: ->first->next = %p", NULL); 
    701701                return HANDLER_GO_ON; 
    702702        } 
  • trunk/src/mod_deflate.c

    r2055 r2060  
    880880        if (mod_deflate_compress(srv, con, hctx, 
    881881                                (unsigned char *)start + (abs_offset - c->file.mmap.offset), toSend) < 0) { 
    882                 ERROR("compress failed.", 0); 
     882                ERROR("%s", "compress failed."); 
    883883                return -1; 
    884884        } 
     
    953953 
    954954                        if (mod_deflate_compress(srv, con, hctx, (unsigned char *)(c->mem->ptr + c->offset), we_want) < 0) { 
    955                                 ERROR("compress failed.", 0); 
     955                                ERROR("%s", "compress failed."); 
    956956                                return HANDLER_ERROR; 
    957957                        } 
     
    967967                         
    968968                        if ((we_want = mod_deflate_file_chunk(srv, con, hctx, c, we_want)) < 0) { 
    969                                 ERROR("compress file chunk failed.", 0); 
     969                                ERROR("%s", "compress file chunk failed."); 
    970970                                return HANDLER_ERROR; 
    971971                        } 
     
    10191019 
    10201020        if (rc < 0) { 
    1021                 ERROR("flush error", 0); 
     1021                ERROR("%s", "flush error"); 
    10221022        } 
    10231023         
     
    11251125        if(!p->conf.enabled) { 
    11261126                if(p->conf.debug) { 
    1127                         TRACE("compression disabled.", 0); 
     1127                        TRACE("%s", "compression disabled."); 
    11281128                } 
    11291129                return HANDLER_GO_ON; 
     
    11741174        fl = filter_chain_get_filter(con->send_filters, p->id); 
    11751175        if (!fl) { 
    1176                 if(p->conf.debug) TRACE("add deflate filter to filter chain", 0); 
     1176                if(p->conf.debug) TRACE("%s", "add deflate filter to filter chain"); 
    11771177                fl = filter_chain_create_filter(con->send_filters, p->id); 
    11781178        } 
     
    12131213 
    12141214                        if(p->conf.debug) { 
    1215                                 TRACE("mime-type:", BUF_STR(mimetype->value)); 
     1215                                TRACE("mime-type: %s", BUF_STR(mimetype->value)); 
    12161216                        } 
    12171217                        if (strncmp(mimetype->value->ptr, ds->value->ptr, mimetype->value->used-1) == 0) { 
  • trunk/src/mod_flv_streaming.c

    r1771 r2060  
    213213                        stat_cache_entry *sce = NULL; 
    214214                        buffer *b; 
    215                         int start; 
     215                        long start; 
    216216                        char *err = NULL; 
    217217                        /* if there is a start=[0-9]+ in the header use it as start, 
  • trunk/src/mod_proxy_backend_ajp13.c

    r2001 r2060  
    303303        if (p == NULL) { 
    304304                if ((data->buf->used - data->offset) <= (len + 1)) { 
    305                         ERROR("we have %d bytes, but a partial-string wants %d. no way", (data->buf->used - data->offset), len); 
     305                        ERROR("we have %ju bytes, but a partial-string wants %zu. no way", (data->buf->used - data->offset), len); 
    306306                        return -1; 
    307307                } 
  • trunk/src/mod_proxy_backend_fastcgi.c

    r1986 r2060  
    480480                out->is_closed = 1; 
    481481 
    482                 TRACE("%ld / %ld -> %d",  
     482                TRACE("%ju / %ju -> %d",  
    483483                                in->bytes_in, in->bytes_out, 
    484484                                in->is_closed); 
  • trunk/src/mod_proxy_core.c

    r2033 r2060  
    10051005                 */ 
    10061006 
    1007                 ERROR("the session ctx is NULL: %p, expect a crash", sess); 
     1007                ERROR("the session ctx is NULL: %p, expect a crash", (void*) sess); 
     1008                // FIXME: do not dereference an known NULL ??? 
    10081009        } 
    10091010 
     
    14451446                        TRACE("connecting to address %s (%p) failed, disabling for 60 sec",  
    14461447                                        BUF_STR(sess->proxy_con->address->name), 
    1447                                         sess->proxy_con->address); 
     1448                                        (void*) sess->proxy_con->address); 
    14481449                        COUNTER_INC(sess->proxy_backend->requests_failed); 
    14491450 
     
    14751476                        case PROXY_CONNECTION_STATE_CONNECTING: 
    14761477                                if (0 != getsockopt(sess->proxy_con->sock->fd, SOL_SOCKET, SO_ERROR, &socket_error, &socket_error_len)) { 
    1477                                         ERROR("getsockopt failed:", strerror(errno)); 
     1478                                        ERROR("getsockopt failed: %s", strerror(errno)); 
    14781479         
    14791480                                        return HANDLER_ERROR; 
  • trunk/src/mod_secure_download.c

    r1771 r2060  
    279279            srv->cur_ts - ts < -p->conf.timeout) { 
    280280                if (con->conf.log_request_handling) { 
    281                         TRACE("timestamp is too old: %d, timeout: %d", ts, p->conf.timeout); 
     281                        TRACE("timestamp is too old: %ld, timeout: %d", ts, p->conf.timeout); 
    282282                } 
    283283 
  • trunk/src/mod_uploadprogress.c

    r1896 r2060  
    535535 
    536536        if (p->conf.debug) { 
    537                 TRACE("response_header: con=%p, http_method=%d, http_status=%d",con, 
     537                TRACE("response_header: con=%p, http_method=%d, http_status=%d", (void*) con, 
    538538                        con->request.http_method, con->http_status); 
    539539        } 
  • trunk/src/network_gthread_aio.c

    r1917 r2060  
    6666        if (!srv->srvconf.log_timing) return; 
    6767 
    68         TRACE("write-start: %d.%06d " 
    69               "read-queue-wait: %d ms " 
    70               "read-time: %d ms " 
    71               "write-time: %d ms ", 
     68        TRACE("write-start: %ld.%06ld " 
     69              "read-queue-wait: %ld ms " 
     70              "read-time: %ld ms " 
     71              "write-time: %ld ms ", 
    7272               con->timestamps[TIME_SEND_WRITE_START].tv_sec, 
    7373               con->timestamps[TIME_SEND_WRITE_START].tv_usec, 
     
    386386                                                        return NETWORK_STATUS_FATAL_ERROR; 
    387387                                                } else if (r != c->file.copy.length) { 
    388                                                         ERROR("read() returned %d instead of %d", r, c->file.copy.length); 
     388                                                        ERROR("read() returned %d instead of %ju", r, c->file.copy.length); 
    389389                         
    390390                                                        return NETWORK_STATUS_FATAL_ERROR; 
  • trunk/src/network_gthread_sendfile.c

    r1758 r2060  
    5757        if (!srv->srvconf.log_timing) return; 
    5858 
    59         TRACE("write-start: %d.%06d " 
    60               "read-queue-wait: %d ms " 
    61               "read-time: %d ms " 
    62               "write-time: %d ms ", 
     59        TRACE("write-start: %ld.%06ld " 
     60              "read-queue-wait: %ld ms " 
     61              "read-time: %ld ms " 
     62              "write-time: %ld ms ", 
    6363               con->timestamps[TIME_SEND_WRITE_START].tv_sec, 
    6464               con->timestamps[TIME_SEND_WRITE_START].tv_usec, 
  • trunk/src/network_posix_aio.c

    r1760 r2060  
    351351 
    352352                                                if (r != c->file.copy.length) { 
    353                                                         ERROR("read() returned %d instead of %d", r, c->file.copy.length); 
     353                                                        ERROR("read() returned %d instead of %ju", r, c->file.copy.length); 
    354354 
    355355                                                        return NETWORK_STATUS_FATAL_ERROR; 
  • trunk/src/server.c

    r2048 r2060  
    985985 
    986986                } else if (n < 0 && poll_errno != EINTR) { 
    987                         ERROR("fdevent_poll failed:", strerror(poll_errno)); 
     987                        ERROR("fdevent_poll failed: %s", strerror(poll_errno)); 
    988988                } 
    989989