Fix GCC warnings
This commit is contained in:
parent
d96205b245
commit
2190d46a14
|
@ -30,6 +30,9 @@
|
|||
#include "tsk_memory.h"
|
||||
#include "tsk_debug.h"
|
||||
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
static tsk_object_t* tdav_video_frame_ctor(tsk_object_t * self, va_list * app)
|
||||
{
|
||||
tdav_video_frame_t *frame = self;
|
||||
|
|
|
@ -259,9 +259,9 @@ tsk_size_t thttp_auth_ws_response(const char* key, thttp_auth_ws_keystring_t* re
|
|||
tsk_strcat_2(&tmp, "%s258EAFA5-E914-47DA-95CA-C5AB0DC85B11", key);
|
||||
|
||||
tsk_sha1compute(tmp, tsk_strlen(tmp), &sha1result);
|
||||
size = tsk_strlen(sha1result);
|
||||
size = tsk_strlen((char*)sha1result);
|
||||
for(i = 0; i<size; i+=2){
|
||||
if(sscanf(&sha1result[i], "%2x", (unsigned int *)&ret) != EOF){;
|
||||
if(sscanf((const char*)&sha1result[i], "%2x", (unsigned int*)&ret) != EOF){;
|
||||
result[i >> 1] = (char)ret;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -263,8 +263,8 @@ int tmedia_parse_video_imageattr(const char* imageattr, tmedia_pref_video_size_t
|
|||
}
|
||||
|
||||
|
||||
for(i = 0; i < attr.send.count; ++i) _imageattr_get_best_size(&attr.send.sets[i], out_width, out_height);
|
||||
for(i = 0; i < attr.recv.count; ++i) _imageattr_get_best_size(&attr.recv.sets[i], in_width, in_height);
|
||||
for(i = 0; i < attr.send.count; ++i) _imageattr_get_best_size(&attr.send.sets[i], (xyvalue_t*)out_width, (xyvalue_t*)out_height);
|
||||
for(i = 0; i < attr.recv.count; ++i) _imageattr_get_best_size(&attr.recv.sets[i], (xyvalue_t*)in_width, (xyvalue_t*)in_height);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
|
||||
// /!\ These are global values shared by all sessions and stacks. Could be set (update) per session using "session_set()"
|
||||
|
||||
static tmedia_profile_t __profile = tmedia_profile_rtcweb;
|
||||
static tmedia_profile_t __profile = tmedia_profile_default;
|
||||
static tmedia_bandwidth_level_t __bl = tmedia_bl_unrestricted;
|
||||
static tmedia_pref_video_size_t __pref_video_size = tmedia_pref_video_size_cif; // 352 x 288: Android, iOS, WP7
|
||||
static int32_t __jb_margin_ms = -1; // disable
|
||||
|
|
|
@ -944,7 +944,7 @@ _again:
|
|||
325
|
||||
/* #line 175 "./ragel/tmedia_imageattr.rl" */
|
||||
){
|
||||
TSK_DEBUG_ERROR("Parsing failed to parse image-attr=%s", in_data);
|
||||
TSK_DEBUG_ERROR("Parsing failed to parse image-attr=%s", (char*)in_data);
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
|
|
@ -29,6 +29,10 @@
|
|||
#include "tsk_string.h"
|
||||
#include "tsk_debug.h"
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
|
||||
static int _tnet_ice_candidate_tostring(
|
||||
uint8_t* foundation,
|
||||
uint32_t comp_id,
|
||||
|
@ -264,7 +268,7 @@ int tnet_ice_candidate_set_local_pref(tnet_ice_candidate_t* self, uint16_t local
|
|||
|
||||
const char* tnet_ice_candidate_tostring(tnet_ice_candidate_t* self)
|
||||
{
|
||||
char* _transport_str;
|
||||
const char* _transport_str;
|
||||
char __str[16]; // always allocated: bad idea :(
|
||||
|
||||
if(!self){
|
||||
|
|
|
@ -44,6 +44,9 @@
|
|||
#include "tsk_fsm.h"
|
||||
#include "tsk_debug.h"
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#ifndef LONG_MAX
|
||||
# define LONG_MAX 2147483647L
|
||||
#endif
|
||||
|
|
|
@ -13,6 +13,9 @@
|
|||
#include "tsk_string.h"
|
||||
#include "tsk_debug.h"
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
static int __pred_find_by_pair(const tsk_list_item_t *item, const void *pair)
|
||||
{
|
||||
if(item && item->data){
|
||||
|
|
|
@ -27,6 +27,9 @@
|
|||
#include "tsk_memory.h"
|
||||
#include "tsk_debug.h"
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#define TRTP_RTCP_PACKET_FB_MIN_SIZE (TRTP_RTCP_HEADER_SIZE + 4 + 4)
|
||||
|
||||
static int _trtp_rtcp_report_fb_deserialize(const void* data, tsk_size_t _size, trtp_rtcp_header_t** header, uint32_t* ssrc_sender, uint32_t* ssrc_media_src)
|
||||
|
|
|
@ -849,7 +849,7 @@ static void _trtp_rtcp_session_set_cname(trtp_rtcp_session_t* self, const void*
|
|||
*((uint32_t*)&_cname[i]) ^= rand();
|
||||
}
|
||||
|
||||
tsk_md5compute(_cname, sizeof(_cname), &self->cname);
|
||||
tsk_md5compute((char*)_cname, sizeof(_cname), &self->cname);
|
||||
self->is_cname_defined = tsk_true;
|
||||
}
|
||||
|
||||
|
|
|
@ -157,7 +157,7 @@ static int _trtp_manager_recv_data(const trtp_manager_t* self, const uint8_t* da
|
|||
if(self->rtcp.session){
|
||||
#if HAVE_SRTP
|
||||
if(self->srtp_ctx_neg_remote){
|
||||
if(srtp_unprotect_rtcp(self->srtp_ctx_neg_remote->session, (void*)data_ptr, &data_size) != err_status_ok){
|
||||
if(srtp_unprotect_rtcp(self->srtp_ctx_neg_remote->session, (void*)data_ptr, (int*)&data_size) != err_status_ok){
|
||||
TSK_DEBUG_ERROR("srtp_unprotect() failed");
|
||||
return -1;
|
||||
}
|
||||
|
@ -174,7 +174,7 @@ static int _trtp_manager_recv_data(const trtp_manager_t* self, const uint8_t* da
|
|||
#if HAVE_SRTP
|
||||
err_status_t status;
|
||||
if(self->srtp_ctx_neg_remote){
|
||||
if((status = srtp_unprotect(self->srtp_ctx_neg_remote->session, (void*)data_ptr, &data_size)) != err_status_ok){
|
||||
if((status = srtp_unprotect(self->srtp_ctx_neg_remote->session, (void*)data_ptr, (int*)&data_size)) != err_status_ok){
|
||||
TSK_DEBUG_ERROR("srtp_unprotect() failed with error code=%d", (int)status);
|
||||
return -1;
|
||||
}
|
||||
|
|
|
@ -68,7 +68,7 @@ int tsk_hmac_xxxcompute(const uint8_t* input, tsk_size_t input_size, const char*
|
|||
TSK_MD5_DIGEST_CALC(key, key_size, (uint8_t*)hkey);
|
||||
}
|
||||
else if(type == sha1){
|
||||
TSK_SHA1_DIGEST_CALC((uint8_t*)key, key_size, hkey);
|
||||
TSK_SHA1_DIGEST_CALC((uint8_t*)key, key_size, (uint8_t*)hkey);
|
||||
}
|
||||
else return -3;
|
||||
|
||||
|
@ -101,7 +101,7 @@ digest_compute:
|
|||
TSK_MD5_DIGEST_CALC(TSK_BUFFER_TO_U8(passx), TSK_BUFFER_SIZE(passx), digest);
|
||||
}
|
||||
else{
|
||||
TSK_SHA1_DIGEST_CALC(TSK_BUFFER_TO_U8(passx), TSK_BUFFER_SIZE(passx), (char*)digest);
|
||||
TSK_SHA1_DIGEST_CALC(TSK_BUFFER_TO_U8(passx), TSK_BUFFER_SIZE(passx), digest);
|
||||
}
|
||||
|
||||
if(pass1_done){
|
||||
|
@ -198,7 +198,7 @@ int hmac_sha1_compute(const uint8_t* input, tsk_size_t input_size, const char* k
|
|||
if((ret = hmac_sha1digest_compute(input, input_size, key, key_size, digest))){
|
||||
return ret;
|
||||
}
|
||||
tsk_str_from_hex((uint8_t*)digest, TSK_SHA1_DIGEST_SIZE, *result);
|
||||
tsk_str_from_hex((uint8_t*)digest, TSK_SHA1_DIGEST_SIZE, (char*)*result);
|
||||
(*result)[TSK_SHA1_STRING_SIZE] = '\0';
|
||||
|
||||
return 0;
|
||||
|
|
|
@ -445,11 +445,11 @@ tsk_sha1_errcode_t tsk_sha1compute(const char* input, tsk_size_t size, tsk_sha1s
|
|||
else if ( (ret = tsk_sha1input(&sha, (uint8_t*)input, size)) != shaSuccess ){
|
||||
return ret;
|
||||
}
|
||||
else if( (ret = tsk_sha1result(&sha, (char*)digest)) != shaSuccess ){
|
||||
else if( (ret = tsk_sha1result(&sha, digest)) != shaSuccess ){
|
||||
return ret;
|
||||
}
|
||||
|
||||
tsk_str_from_hex(digest, TSK_SHA1_DIGEST_SIZE, *result);
|
||||
tsk_str_from_hex(digest, TSK_SHA1_DIGEST_SIZE, (char*)*result);
|
||||
|
||||
return shaSuccess;
|
||||
}
|
||||
|
|
|
@ -128,7 +128,7 @@ tsk_bool_t tcomp_compressordisp_compress(tcomp_compressordisp_t *dispatcher, uin
|
|||
|
||||
tsk_sha1reset(&sha);
|
||||
tsk_sha1input(&sha, (const uint8_t*)output_ptr, *output_size);
|
||||
tsk_sha1result(&sha, (char*)nackId);
|
||||
tsk_sha1result(&sha, (uint8_t*)nackId);
|
||||
tcomp_compartment_addNack(lpCompartment, nackId);
|
||||
}
|
||||
|
||||
|
|
|
@ -106,7 +106,7 @@ void tcomp_state_makeValid(tcomp_state_t* state)
|
|||
|
||||
tsk_sha1input(&sha, firstPart, 8);
|
||||
tsk_sha1input(&sha, tcomp_buffer_getBuffer(state->value), tcomp_buffer_getSize(state->value));
|
||||
err = tsk_sha1result(&sha, (char*)tcomp_buffer_getBuffer(state->identifier));
|
||||
err = tsk_sha1result(&sha, (uint8_t*)tcomp_buffer_getBuffer(state->identifier));
|
||||
}
|
||||
|
||||
/* unlock */
|
||||
|
|
|
@ -580,7 +580,7 @@ tsk_bool_t TCOMP_UDVM_EXEC_INST__SHA_1(tcomp_udvm_t *udvm, uint16_t position, ui
|
|||
goto bail;
|
||||
}
|
||||
|
||||
if( (err = tsk_sha1result(&sha, (char*)Message_Digest)) ){
|
||||
if( (err = tsk_sha1result(&sha, (uint8_t*)Message_Digest)) ){
|
||||
ok = tsk_false;
|
||||
tcomp_udvm_createNackInfo2(udvm, NACK_INTERNAL_ERROR);
|
||||
goto bail;
|
||||
|
|
|
@ -88,7 +88,7 @@ void tcomp_udvm_createNackInfo(tcomp_udvm_t *udvm, uint8_t reasonCode, tcomp_buf
|
|||
*/
|
||||
tsk_sha1reset(&sha);
|
||||
tsk_sha1input(&sha, udvm->sigCompMessage->startPtr, udvm->sigCompMessage->totalSize);
|
||||
tsk_sha1result(&sha, (char*)(nackbuffer_ptr + NACK_SHA1_INDEX));
|
||||
tsk_sha1result(&sha, (uint8_t*)(nackbuffer_ptr + NACK_SHA1_INDEX));
|
||||
|
||||
/*
|
||||
* Details
|
||||
|
|
Loading…
Reference in New Issue