Fix compile errors with --enable-maintainer-mode

This commit is contained in:
Tatsuhiro Tsujikawa 2014-02-11 21:39:35 +09:00
parent bac31e844a
commit c7a17093cb
2 changed files with 5 additions and 5 deletions

View File

@ -1089,7 +1089,7 @@ static ssize_t session_call_select_padding(nghttp2_session *session,
rv = session->callbacks.select_padding_callback(session, frame,
max_payloadlen,
session->user_data);
if(rv < frame->hd.length || rv > max_payloadlen) {
if(rv < (ssize_t)frame->hd.length || rv > (ssize_t)max_payloadlen) {
return NGHTTP2_ERR_CALLBACK_FAILURE;
}
return rv;

View File

@ -818,7 +818,7 @@ void test_nghttp2_session_recv_premature_headers(void)
nghttp2_put_uint16be(framedata + bufoff, frame.hd.length - 1);
rv = nghttp2_session_mem_recv(session, framedata + bufoff,
framedatalen - bufoff - 1);
CU_ASSERT((ssize_t)framedatalen - bufoff - 1 == rv);
CU_ASSERT((ssize_t)(framedatalen - bufoff - 1) == rv);
item = nghttp2_session_get_next_ob_item(session);
CU_ASSERT(NULL != item);
@ -3576,12 +3576,12 @@ void test_nghttp2_session_flow_control_data_with_padding_recv(void)
data[NGHTTP2_FRAME_HEAD_LENGTH] = 1;
data[NGHTTP2_FRAME_HEAD_LENGTH + 1] = 1;
CU_ASSERT(NGHTTP2_FRAME_HEAD_LENGTH + hd.length ==
CU_ASSERT((ssize_t)(NGHTTP2_FRAME_HEAD_LENGTH + hd.length) ==
nghttp2_session_mem_recv(session, data,
NGHTTP2_FRAME_HEAD_LENGTH + hd.length));
CU_ASSERT(hd.length == session->recv_window_size);
CU_ASSERT(hd.length == stream->recv_window_size);
CU_ASSERT((int32_t)hd.length == session->recv_window_size);
CU_ASSERT((int32_t)hd.length == stream->recv_window_size);
nghttp2_session_del(session);
}