diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2009-01-29 17:58:28 +0100 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2009-01-29 17:58:28 +0100 |
commit | 9c0b5859e6cc4b7a0e925fde8665990281b265d3 (patch) | |
tree | 8994dbe0942d56c9a7cf470fc3b2316d1f91e0a3 /src/sdpd-request.c | |
parent | 1ce81e1e0794a5d619016e17b33b533b614fc6a9 (diff) |
Fix mostly every warning caused by -Wsign-compare
Diffstat (limited to 'src/sdpd-request.c')
-rw-r--r-- | src/sdpd-request.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/sdpd-request.c b/src/sdpd-request.c index ae08fa513..1015213f8 100644 --- a/src/sdpd-request.c +++ b/src/sdpd-request.c @@ -122,7 +122,7 @@ static int extract_des(uint8_t *buf, int len, sdp_list_t **svcReqSeq, uint8_t *p char *pElem = NULL; int localSeqLength = 0; - if (bufsize < sizeof(uint8_t)) { + if (bufsize < (int) sizeof(uint8_t)) { SDPDBG("->Unexpected end of buffer"); return -1; } @@ -145,7 +145,7 @@ static int extract_des(uint8_t *buf, int len, sdp_list_t **svcReqSeq, uint8_t *p p += sizeof(uint8_t); seqlen += sizeof(uint8_t); bufsize -= sizeof(uint8_t); - if (bufsize < sizeof(uint16_t)) { + if (bufsize < (int) sizeof(uint16_t)) { SDPDBG("->Unexpected end of buffer"); return -1; } @@ -460,9 +460,9 @@ static int service_search_req(sdp_req_t *req, sdp_buf_t *buf) SDPDBG("Setting non-NULL sdp_cstate_t"); if (cstate) - memcpy((char *)&newState, cstate, sizeof(sdp_cont_state_t)); + memcpy(&newState, cstate, sizeof(sdp_cont_state_t)); else { - memset((char *)&newState, 0, sizeof(sdp_cont_state_t)); + memset(&newState, 0, sizeof(sdp_cont_state_t)); newState.timestamp = cStateId; } newState.cStateValue.lastIndexSent = i; @@ -563,7 +563,7 @@ static int service_attr_req(sdp_req_t *req, sdp_buf_t *buf) sdp_list_t *seq = NULL; uint8_t dtd = 0; int scanned = 0; - int max_rsp_size; + unsigned int max_rsp_size; int status = 0, plen, mlen; uint8_t *pdata = req->buf + sizeof(sdp_pdu_hdr_t); uint32_t handle = ntohl(bt_get_unaligned((uint32_t *)pdata)); @@ -679,7 +679,8 @@ static int service_search_attr_req(sdp_req_t *req, sdp_buf_t *buf) { int status = 0, plen, totscanned; uint8_t *pdata, *pResponse = NULL; - int scanned, max, rsp_count = 0; + unsigned int max; + int scanned, rsp_count = 0; sdp_list_t *pattern = NULL, *seq = NULL, *svcList; sdp_cont_state_t *cstate = NULL; short cstate_size = 0; |