- remove some compiler warnings

This commit is contained in:
MelwareDE 2006-01-03 20:03:00 +00:00
parent 62e5876536
commit bba36b630c
1 changed files with 21 additions and 21 deletions

View File

@ -481,7 +481,7 @@ static void capi_echo_canceller(struct ast_channel *c, int function)
/* buf 8 and 9 are "pre-delay lenght ms" */
}
FACILITY_REQ_FACILITYREQUESTPARAMETER(&CMSG) = buf;
FACILITY_REQ_FACILITYREQUESTPARAMETER(&CMSG) = (_cstruct)buf;
if (_capi_put_cmsg(&CMSG) != 0) {
return;
@ -524,7 +524,7 @@ static int capi_detect_dtmf(struct ast_channel *c, int flag)
}
write_capi_word(&buf[3], CAPI_DTMF_DURATION);
write_capi_word(&buf[5], CAPI_DTMF_DURATION);
FACILITY_REQ_FACILITYREQUESTPARAMETER(&CMSG) = buf;
FACILITY_REQ_FACILITYREQUESTPARAMETER(&CMSG) = (_cstruct)buf;
if ((error = _capi_put_cmsg(&CMSG)) != 0) {
return error;
@ -572,7 +572,7 @@ static int capi_send_info_digits(struct capi_pvt *i, char *digits, int len)
for (a = 0; a < len; a++) {
buf[a + 2] = digits[a];
}
INFO_REQ_CALLEDPARTYNUMBER(&CMSG) = buf;
INFO_REQ_CALLEDPARTYNUMBER(&CMSG) = (_cstruct)buf;
if ((error = _capi_put_cmsg(&CMSG)) != 0) {
return error;
@ -641,7 +641,7 @@ static int capi_send_digit(struct ast_channel *c, char digit)
write_capi_word(&buf[5], CAPI_DTMF_DURATION);
buf[7] = 1;
buf[8] = digit;
FACILITY_REQ_FACILITYREQUESTPARAMETER(&CMSG) = buf;
FACILITY_REQ_FACILITYREQUESTPARAMETER(&CMSG) = (_cstruct)buf;
if ((ret = _capi_put_cmsg(&CMSG)) == 0) {
cc_verbose(3, 0, VERBOSE_PREFIX_4 "%s: sent dtmf '%c'\n",
@ -1025,8 +1025,8 @@ static int capi_call(struct ast_channel *c, char *idest, int timeout)
}
called[1] = 0x80;
strncpy(&called[2], dest, sizeof(called) - 3);
CONNECT_REQ_CALLEDPARTYNUMBER(&CMSG) = called;
CONNECT_REQ_CALLEDPARTYSUBADDRESS(&CMSG) = dsa;
CONNECT_REQ_CALLEDPARTYNUMBER(&CMSG) = (_cstruct)called;
CONNECT_REQ_CALLEDPARTYSUBADDRESS(&CMSG) = (_cstruct)dsa;
#ifdef CC_AST_CHANNEL_HAS_CID
if (c->cid.cid_num)
@ -1049,8 +1049,8 @@ static int capi_call(struct ast_channel *c, char *idest, int timeout)
calling[2] = 0x80 | (CLIR & 0x63);
strncpy(&calling[3], callerid, sizeof(calling) - 4);
CONNECT_REQ_CALLINGPARTYNUMBER(&CMSG) = calling;
CONNECT_REQ_CALLINGPARTYSUBADDRESS(&CMSG) = osa;
CONNECT_REQ_CALLINGPARTYNUMBER(&CMSG) = (_cstruct)calling;
CONNECT_REQ_CALLINGPARTYSUBADDRESS(&CMSG) = (_cstruct)osa;
CONNECT_REQ_B1PROTOCOL(&CMSG) = 1;
CONNECT_REQ_B2PROTOCOL(&CMSG) = 1;
@ -1059,7 +1059,7 @@ static int capi_call(struct ast_channel *c, char *idest, int timeout)
bchaninfo[0] = 2;
bchaninfo[1] = 0x0;
bchaninfo[2] = 0x0;
CONNECT_REQ_BCHANNELINFORMATION(&CMSG) = bchaninfo; /* 0 */
CONNECT_REQ_BCHANNELINFORMATION(&CMSG) = (_cstruct)bchaninfo; /* 0 */
if ((error = _capi_put_cmsg(&CMSG))) {
interface_cleanup(i);
@ -1107,12 +1107,12 @@ static int capi_send_answer(struct ast_channel *c, int *bprot, _cstruct b3conf)
buf[1] = 0x00;
buf[2] = 0x80;
strncpy(&buf[3], dnid, sizeof(buf) - 4);
CONNECT_RESP_CONNECTEDNUMBER(&CMSG) = buf;
CONNECT_RESP_CONNECTEDNUMBER(&CMSG) = (_cstruct)buf;
}
CONNECT_RESP_B1PROTOCOL(&CMSG) = bprot[0];
CONNECT_RESP_B2PROTOCOL(&CMSG) = bprot[1];
CONNECT_RESP_B3PROTOCOL(&CMSG) = bprot[2];
CONNECT_RESP_B3CONFIGURATION(&CMSG) = b3conf;
CONNECT_RESP_B3CONFIGURATION(&CMSG) = (_cstruct)b3conf;
cc_verbose(3, 0, VERBOSE_PREFIX_2 "%s: Answering for %s\n",
i->name, dnid);
@ -1391,7 +1391,7 @@ static int line_interconnect(struct capi_pvt *i0, struct capi_pvt *i1, int start
write_capi_dword(&buf[4], i1->PLCI);
}
FACILITY_REQ_FACILITYREQUESTPARAMETER(&CMSG) = buf;
FACILITY_REQ_FACILITYREQUESTPARAMETER(&CMSG) = (_cstruct)buf;
_capi_put_cmsg(&CMSG);
@ -3169,10 +3169,10 @@ static int capi_call_deflect(struct ast_channel *c, char *param)
INFO_REQ_HEADER(&CMSG, capi_ApplID, get_capi_MessageNumber(), 0);
INFO_REQ_CONTROLLER(&CMSG) = i->controller;
INFO_REQ_PLCI(&CMSG) = i->PLCI;
INFO_REQ_BCHANNELINFORMATION(&CMSG) = (unsigned char*)bchaninfo; /* use D-Channel */
INFO_REQ_BCHANNELINFORMATION(&CMSG) = (_cstruct)bchaninfo; /* use D-Channel */
INFO_REQ_KEYPADFACILITY(&CMSG) = 0;
INFO_REQ_USERUSERDATA(&CMSG) = 0;
INFO_REQ_FACILITYDATAARRAY(&CMSG) = (unsigned char*)fac + 4;
INFO_REQ_FACILITYDATAARRAY(&CMSG) = (_cstruct)fac + 4;
_capi_put_cmsg(&CMSG);
@ -3674,7 +3674,7 @@ static int capi_retrieve(struct ast_channel *c, char *param)
FACILITY_REQ_HEADER(&CMSG, capi_ApplID, get_capi_MessageNumber(),0);
FACILITY_REQ_PLCI(&CMSG) = plci;
FACILITY_REQ_FACILITYSELECTOR(&CMSG) = FACILITYSELECTOR_SUPPLEMENTARY;
FACILITY_REQ_FACILITYREQUESTPARAMETER(&CMSG) = (char *)&fac;
FACILITY_REQ_FACILITYREQUESTPARAMETER(&CMSG) = (_cstruct)&fac;
_capi_put_cmsg(&CMSG);
cc_verbose(2, 1, VERBOSE_PREFIX_4 "%s: sent RETRIEVE for PLCI=%#x\n",
@ -3766,7 +3766,7 @@ static int capi_ect(struct ast_channel *c, char *param)
FACILITY_REQ_CONTROLLER(&CMSG) = i->controller;
FACILITY_REQ_PLCI(&CMSG) = i->PLCI;
FACILITY_REQ_FACILITYSELECTOR(&CMSG) = FACILITYSELECTOR_SUPPLEMENTARY;
FACILITY_REQ_FACILITYREQUESTPARAMETER(&CMSG) = (char *)&fac;
FACILITY_REQ_FACILITYREQUESTPARAMETER(&CMSG) = (_cstruct)&fac;
_capi_put_cmsg(&CMSG);
@ -3817,7 +3817,7 @@ static int capi_hold(struct ast_channel *c, char *param)
FACILITY_REQ_HEADER(&CMSG, capi_ApplID, get_capi_MessageNumber(),0);
FACILITY_REQ_PLCI(&CMSG) = i->PLCI;
FACILITY_REQ_FACILITYSELECTOR(&CMSG) = FACILITYSELECTOR_SUPPLEMENTARY;
FACILITY_REQ_FACILITYREQUESTPARAMETER(&CMSG) = (char *)&fac;
FACILITY_REQ_FACILITYREQUESTPARAMETER(&CMSG) = (_cstruct)&fac;
_capi_put_cmsg(&CMSG);
cc_verbose(2, 1, VERBOSE_PREFIX_4 "%s: sent HOLD for PLCI=%#x\n",
@ -3860,7 +3860,7 @@ static int capi_malicious(struct ast_channel *c, char *param)
FACILITY_REQ_HEADER(&CMSG, capi_ApplID, get_capi_MessageNumber(),0);
FACILITY_REQ_PLCI(&CMSG) = i->PLCI;
FACILITY_REQ_FACILITYSELECTOR(&CMSG) = FACILITYSELECTOR_SUPPLEMENTARY;
FACILITY_REQ_FACILITYREQUESTPARAMETER(&CMSG) = (char *)&fac;
FACILITY_REQ_FACILITYREQUESTPARAMETER(&CMSG) = (_cstruct)&fac;
_capi_put_cmsg(&CMSG);
@ -4358,7 +4358,7 @@ static void supported_sservices(struct cc_capi_controller *cp)
FACILITY_REQ_CONTROLLER(&CMSG) = cp->controller;
FACILITY_REQ_FACILITYSELECTOR(&CMSG) = FACILITYSELECTOR_SUPPLEMENTARY;
fac[0] = 3;
FACILITY_REQ_FACILITYREQUESTPARAMETER(&CMSG) = (char *)&fac;
FACILITY_REQ_FACILITYREQUESTPARAMETER(&CMSG) = (_cstruct)&fac;
_capi_put_cmsg(&CMSG);
tv.tv_sec = 1;
@ -4568,7 +4568,7 @@ static int cc_init_capi(void)
#elif (CAPI_OS_HINT == 2)
if (capi20_get_profile(0, &profile, sizeof(profile)) != 0) {
#else
if (capi20_get_profile(0, (char *)&profile) != 0) {
if (capi20_get_profile(0, (unsigned char *)&profile) != 0) {
#endif
cc_log(LOG_NOTICE,"unable to get CAPI profile!\n");
return -1;
@ -4591,7 +4591,7 @@ static int cc_init_capi(void)
#elif (CAPI_OS_HINT == 2)
capi20_get_profile(controller, &profile, sizeof(profile));
#else
capi20_get_profile(controller, (char *)&profile);
capi20_get_profile(controller, (unsigned char *)&profile);
#endif
cp = malloc(sizeof(struct cc_capi_controller));
if (!cp) {