Fixed compile error with --enable-maintainer-mode

This commit is contained in:
Tatsuhiro Tsujikawa 2012-06-11 23:12:23 +09:00
parent d12217a1c5
commit 7b8768bd3a
3 changed files with 7 additions and 4 deletions

View File

@ -1560,7 +1560,8 @@ hdrline_start:
{
const char * pp = &data[i];
const char * pe = (const char *)(data + len);
size_t to_read = _MIN_READ(pe - pp, p->content_len);
size_t to_read = _MIN_READ((uint64_t)(pe - pp),
p->content_len);
if (to_read > 0) {
res = hook_body_run(p, hooks, pp, to_read);
@ -1612,7 +1613,8 @@ hdrline_start:
{
const char * pp = &data[i];
const char * pe = (const char *)(data + len);
size_t to_read = _MIN_READ(pe - pp, p->content_len);
size_t to_read = _MIN_READ((uint64_t)(pe - pp),
p->content_len);
htparse_log_debug("[%p] s_body_read %zu", p, to_read);

View File

@ -96,6 +96,7 @@ unsigned char htparser_get_major(htparser *);
unsigned char htparser_get_minor(htparser *);
unsigned int htparser_get_status(htparser *);
uint64_t htparser_get_content_length(htparser *);
uint64_t htparser_get_bytes_read(htparser *);
uint64_t htparser_get_total_bytes_read(htparser *);
htpparse_error htparser_get_error(htparser *);
const char * htparser_get_strerror(htparser *);

View File

@ -66,12 +66,12 @@ void test_spdylay_pq(void)
/* Add bunch of entry to see realloc works */
for(i = 0; i < 10000; ++i) {
CU_ASSERT(0 == spdylay_pq_push(&pq, (void*)"foo"));
CU_ASSERT(i+1 == spdylay_pq_size(&pq));
CU_ASSERT((size_t)(i+1) == spdylay_pq_size(&pq));
}
for(i = 10000; i > 0; --i) {
CU_ASSERT(NULL != spdylay_pq_top(&pq));
spdylay_pq_pop(&pq);
CU_ASSERT(i-1 == spdylay_pq_size(&pq));
CU_ASSERT((size_t)(i-1) == spdylay_pq_size(&pq));
}
spdylay_pq_free(&pq);