From 74f31a51bc4fdf14b6f3a5d2f886c65ff882bd55 Mon Sep 17 00:00:00 2001 From: "Kevin P. Fleming" Date: Sun, 18 Feb 2007 15:03:42 +0000 Subject: add -Wundef to the --enable-dev-mode flags, so that mistyped macro names in #if expressions will be caught convert various #if expressions to #ifdef for macros that may not be defined (and where the value is not important) Note: two of these changes are in bison generated files which is going to be inconvenient when they are regenerated git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@55329 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- channels/misdn/isdn_msg_parser.c | 120 +++++++++++++++++++-------------------- 1 file changed, 60 insertions(+), 60 deletions(-) (limited to 'channels/misdn') diff --git a/channels/misdn/isdn_msg_parser.c b/channels/misdn/isdn_msg_parser.c index aa6fb73f6..44661adff 100644 --- a/channels/misdn/isdn_msg_parser.c +++ b/channels/misdn/isdn_msg_parser.c @@ -65,7 +65,7 @@ static void parse_proceeding (struct isdn_msg msgs[], msg_t *msg, struct misdn_b dec_ie_progress(proceeding->PROGRESS, (Q931_info_t *)proceeding, &bc->progress_coding, &bc->progress_location, &bc->progress_indicator, nt, bc); -#if DEBUG +#ifdef DEBUG printf("Parsing PROCEEDING Msg\n"); #endif } @@ -83,7 +83,7 @@ static msg_t *build_proceeding (struct isdn_msg msgs[], struct misdn_bchannel *b enc_ie_progress(&proceeding->PROGRESS, msg, 0, nt?1:5, 8, nt,bc); -#if DEBUG +#ifdef DEBUG printf("Building PROCEEDING Msg\n"); #endif return msg; @@ -97,7 +97,7 @@ static void parse_alerting (struct isdn_msg msgs[], msg_t *msg, struct misdn_bch dec_ie_progress(alerting->PROGRESS, (Q931_info_t *)alerting, &bc->progress_coding, &bc->progress_location, &bc->progress_indicator, nt, bc); -#if DEBUG +#ifdef DEBUG printf("Parsing ALERTING Msg\n"); #endif @@ -116,7 +116,7 @@ static msg_t *build_alerting (struct isdn_msg msgs[], struct misdn_bchannel *bc, if (nt) enc_ie_progress(&alerting->PROGRESS, msg, 0, nt?1:5, 8, nt,bc); -#if DEBUG +#ifdef DEBUG printf("Building ALERTING Msg\n"); #endif return msg; @@ -131,7 +131,7 @@ static void parse_progress (struct isdn_msg msgs[], msg_t *msg, struct misdn_bch dec_ie_progress(progress->PROGRESS, (Q931_info_t *)progress, &bc->progress_coding, &bc->progress_location, &bc->progress_indicator, nt, bc); -#if DEBUG +#ifdef DEBUG printf("Parsing PROGRESS Msg\n"); #endif } @@ -144,7 +144,7 @@ static msg_t *build_progress (struct isdn_msg msgs[], struct misdn_bchannel *bc, progress=(PROGRESS_t*)((msg->data+HEADER_LEN)); -#if DEBUG +#ifdef DEBUG printf("Building PROGRESS Msg\n"); #endif return msg; @@ -156,7 +156,7 @@ static void parse_setup (struct isdn_msg msgs[], msg_t *msg, struct misdn_bchann SETUP_t *setup= (SETUP_t*)((unsigned long)msg->data+HEADER_LEN); Q931_info_t *qi=(Q931_info_t*)((unsigned long)msg->data+HEADER_LEN); -#if DEBUG +#ifdef DEBUG printf("Parsing SETUP Msg\n"); #endif { @@ -331,7 +331,7 @@ static msg_t *build_setup (struct isdn_msg msgs[], struct misdn_bchannel *bc, in enc_ie_complete(&setup->BEARER,msg, bc->sending_complete, nt, bc); } -#if DEBUG +#ifdef DEBUG printf("Building SETUP Msg\n"); #endif return msg; @@ -355,7 +355,7 @@ static void parse_connect (struct isdn_msg msgs[], msg_t *msg, struct misdn_bcha cb_log(1,bc->port,"CONNETED PN: %s cpn_dialplan:%d\n", connected_pn, type); */ -#if DEBUG +#ifdef DEBUG printf("Parsing CONNECT Msg\n"); #endif } @@ -381,7 +381,7 @@ static msg_t *build_connect (struct isdn_msg msgs[], struct misdn_bchannel *bc, enc_ie_connected_pn(&connect->CONNECT_PN, msg, type,plan, present, screen, bc->cad, nt , bc); } -#if DEBUG +#ifdef DEBUG printf("Building CONNECT Msg\n"); #endif return msg; @@ -401,7 +401,7 @@ static void parse_setup_acknowledge (struct isdn_msg msgs[], msg_t *msg, struct } dec_ie_progress(setup_acknowledge->PROGRESS, (Q931_info_t *)setup_acknowledge, &bc->progress_coding, &bc->progress_location, &bc->progress_indicator, nt, bc); -#if DEBUG +#ifdef DEBUG printf("Parsing SETUP_ACKNOWLEDGE Msg\n"); #endif @@ -421,7 +421,7 @@ static msg_t *build_setup_acknowledge (struct isdn_msg msgs[], struct misdn_bcha if (nt) enc_ie_progress(&setup_acknowledge->PROGRESS, msg, 0, nt?1:5, 8, nt,bc); -#if DEBUG +#ifdef DEBUG printf("Building SETUP_ACKNOWLEDGE Msg\n"); #endif return msg; @@ -429,7 +429,7 @@ static msg_t *build_setup_acknowledge (struct isdn_msg msgs[], struct misdn_bcha static void parse_connect_acknowledge (struct isdn_msg msgs[], msg_t *msg, struct misdn_bchannel *bc, int nt) { -#if DEBUG +#ifdef DEBUG printf("Parsing CONNECT_ACKNOWLEDGE Msg\n"); #endif @@ -446,7 +446,7 @@ static msg_t *build_connect_acknowledge (struct isdn_msg msgs[], struct misdn_bc enc_ie_channel_id(&connect_acknowledge->CHANNEL_ID, msg, 1, bc->channel, nt,bc); -#if DEBUG +#ifdef DEBUG printf("Building CONNECT_ACKNOWLEDGE Msg\n"); #endif return msg; @@ -454,7 +454,7 @@ static msg_t *build_connect_acknowledge (struct isdn_msg msgs[], struct misdn_bc static void parse_user_information (struct isdn_msg msgs[], msg_t *msg, struct misdn_bchannel *bc, int nt) { -#if DEBUG +#ifdef DEBUG printf("Parsing USER_INFORMATION Msg\n"); #endif @@ -469,7 +469,7 @@ static msg_t *build_user_information (struct isdn_msg msgs[], struct misdn_bchan user_information=(USER_INFORMATION_t*)((msg->data+HEADER_LEN)); -#if DEBUG +#ifdef DEBUG printf("Building USER_INFORMATION Msg\n"); #endif return msg; @@ -477,7 +477,7 @@ static msg_t *build_user_information (struct isdn_msg msgs[], struct misdn_bchan static void parse_suspend_reject (struct isdn_msg msgs[], msg_t *msg, struct misdn_bchannel *bc, int nt) { -#if DEBUG +#ifdef DEBUG printf("Parsing SUSPEND_REJECT Msg\n"); #endif @@ -492,7 +492,7 @@ static msg_t *build_suspend_reject (struct isdn_msg msgs[], struct misdn_bchanne suspend_reject=(SUSPEND_REJECT_t*)((msg->data+HEADER_LEN)); -#if DEBUG +#ifdef DEBUG printf("Building SUSPEND_REJECT Msg\n"); #endif return msg; @@ -500,7 +500,7 @@ static msg_t *build_suspend_reject (struct isdn_msg msgs[], struct misdn_bchanne static void parse_resume_reject (struct isdn_msg msgs[], msg_t *msg, struct misdn_bchannel *bc, int nt) { -#if DEBUG +#ifdef DEBUG printf("Parsing RESUME_REJECT Msg\n"); #endif @@ -515,7 +515,7 @@ static msg_t *build_resume_reject (struct isdn_msg msgs[], struct misdn_bchannel resume_reject=(RESUME_REJECT_t*)((msg->data+HEADER_LEN)); -#if DEBUG +#ifdef DEBUG printf("Building RESUME_REJECT Msg\n"); #endif return msg; @@ -523,7 +523,7 @@ static msg_t *build_resume_reject (struct isdn_msg msgs[], struct misdn_bchannel static void parse_hold (struct isdn_msg msgs[], msg_t *msg, struct misdn_bchannel *bc, int nt) { -#if DEBUG +#ifdef DEBUG printf("Parsing HOLD Msg\n"); #endif @@ -538,7 +538,7 @@ static msg_t *build_hold (struct isdn_msg msgs[], struct misdn_bchannel *bc, int hold=(HOLD_t*)((msg->data+HEADER_LEN)); -#if DEBUG +#ifdef DEBUG printf("Building HOLD Msg\n"); #endif return msg; @@ -546,7 +546,7 @@ static msg_t *build_hold (struct isdn_msg msgs[], struct misdn_bchannel *bc, int static void parse_suspend (struct isdn_msg msgs[], msg_t *msg, struct misdn_bchannel *bc, int nt) { -#if DEBUG +#ifdef DEBUG printf("Parsing SUSPEND Msg\n"); #endif @@ -561,7 +561,7 @@ static msg_t *build_suspend (struct isdn_msg msgs[], struct misdn_bchannel *bc, suspend=(SUSPEND_t*)((msg->data+HEADER_LEN)); -#if DEBUG +#ifdef DEBUG printf("Building SUSPEND Msg\n"); #endif return msg; @@ -569,7 +569,7 @@ static msg_t *build_suspend (struct isdn_msg msgs[], struct misdn_bchannel *bc, static void parse_resume (struct isdn_msg msgs[], msg_t *msg, struct misdn_bchannel *bc, int nt) { -#if DEBUG +#ifdef DEBUG printf("Parsing RESUME Msg\n"); #endif @@ -584,7 +584,7 @@ static msg_t *build_resume (struct isdn_msg msgs[], struct misdn_bchannel *bc, i resume=(RESUME_t*)((msg->data+HEADER_LEN)); -#if DEBUG +#ifdef DEBUG printf("Building RESUME Msg\n"); #endif return msg; @@ -592,7 +592,7 @@ static msg_t *build_resume (struct isdn_msg msgs[], struct misdn_bchannel *bc, i static void parse_hold_acknowledge (struct isdn_msg msgs[], msg_t *msg, struct misdn_bchannel *bc, int nt) { -#if DEBUG +#ifdef DEBUG printf("Parsing HOLD_ACKNOWLEDGE Msg\n"); #endif @@ -607,7 +607,7 @@ static msg_t *build_hold_acknowledge (struct isdn_msg msgs[], struct misdn_bchan hold_acknowledge=(HOLD_ACKNOWLEDGE_t*)((msg->data+HEADER_LEN)); -#if DEBUG +#ifdef DEBUG printf("Building HOLD_ACKNOWLEDGE Msg\n"); #endif return msg; @@ -615,7 +615,7 @@ static msg_t *build_hold_acknowledge (struct isdn_msg msgs[], struct misdn_bchan static void parse_suspend_acknowledge (struct isdn_msg msgs[], msg_t *msg, struct misdn_bchannel *bc, int nt) { -#if DEBUG +#ifdef DEBUG printf("Parsing SUSPEND_ACKNOWLEDGE Msg\n"); #endif @@ -630,7 +630,7 @@ static msg_t *build_suspend_acknowledge (struct isdn_msg msgs[], struct misdn_bc suspend_acknowledge=(SUSPEND_ACKNOWLEDGE_t*)((msg->data+HEADER_LEN)); -#if DEBUG +#ifdef DEBUG printf("Building SUSPEND_ACKNOWLEDGE Msg\n"); #endif return msg; @@ -638,7 +638,7 @@ static msg_t *build_suspend_acknowledge (struct isdn_msg msgs[], struct misdn_bc static void parse_resume_acknowledge (struct isdn_msg msgs[], msg_t *msg, struct misdn_bchannel *bc, int nt) { -#if DEBUG +#ifdef DEBUG printf("Parsing RESUME_ACKNOWLEDGE Msg\n"); #endif @@ -653,7 +653,7 @@ static msg_t *build_resume_acknowledge (struct isdn_msg msgs[], struct misdn_bch resume_acknowledge=(RESUME_ACKNOWLEDGE_t*)((msg->data+HEADER_LEN)); -#if DEBUG +#ifdef DEBUG printf("Building RESUME_ACKNOWLEDGE Msg\n"); #endif return msg; @@ -661,7 +661,7 @@ static msg_t *build_resume_acknowledge (struct isdn_msg msgs[], struct misdn_bch static void parse_hold_reject (struct isdn_msg msgs[], msg_t *msg, struct misdn_bchannel *bc, int nt) { -#if DEBUG +#ifdef DEBUG printf("Parsing HOLD_REJECT Msg\n"); #endif @@ -676,7 +676,7 @@ static msg_t *build_hold_reject (struct isdn_msg msgs[], struct misdn_bchannel * hold_reject=(HOLD_REJECT_t*)((msg->data+HEADER_LEN)); -#if DEBUG +#ifdef DEBUG printf("Building HOLD_REJECT Msg\n"); #endif return msg; @@ -684,7 +684,7 @@ static msg_t *build_hold_reject (struct isdn_msg msgs[], struct misdn_bchannel * static void parse_retrieve (struct isdn_msg msgs[], msg_t *msg, struct misdn_bchannel *bc, int nt) { -#if DEBUG +#ifdef DEBUG printf("Parsing RETRIEVE Msg\n"); #endif @@ -699,7 +699,7 @@ static msg_t *build_retrieve (struct isdn_msg msgs[], struct misdn_bchannel *bc, retrieve=(RETRIEVE_t*)((msg->data+HEADER_LEN)); -#if DEBUG +#ifdef DEBUG printf("Building RETRIEVE Msg\n"); #endif return msg; @@ -707,7 +707,7 @@ static msg_t *build_retrieve (struct isdn_msg msgs[], struct misdn_bchannel *bc, static void parse_retrieve_acknowledge (struct isdn_msg msgs[], msg_t *msg, struct misdn_bchannel *bc, int nt) { -#if DEBUG +#ifdef DEBUG printf("Parsing RETRIEVE_ACKNOWLEDGE Msg\n"); #endif @@ -723,7 +723,7 @@ static msg_t *build_retrieve_acknowledge (struct isdn_msg msgs[], struct misdn_b retrieve_acknowledge=(RETRIEVE_ACKNOWLEDGE_t*)((msg->data+HEADER_LEN)); enc_ie_channel_id(&retrieve_acknowledge->CHANNEL_ID, msg, 1, bc->channel, nt,bc); -#if DEBUG +#ifdef DEBUG printf("Building RETRIEVE_ACKNOWLEDGE Msg\n"); #endif return msg; @@ -731,7 +731,7 @@ static msg_t *build_retrieve_acknowledge (struct isdn_msg msgs[], struct misdn_b static void parse_retrieve_reject (struct isdn_msg msgs[], msg_t *msg, struct misdn_bchannel *bc, int nt) { -#if DEBUG +#ifdef DEBUG printf("Parsing RETRIEVE_REJECT Msg\n"); #endif @@ -746,7 +746,7 @@ static msg_t *build_retrieve_reject (struct isdn_msg msgs[], struct misdn_bchann retrieve_reject=(RETRIEVE_REJECT_t*)((msg->data+HEADER_LEN)); -#if DEBUG +#ifdef DEBUG printf("Building RETRIEVE_REJECT Msg\n"); #endif return msg; @@ -762,7 +762,7 @@ static void parse_disconnect (struct isdn_msg msgs[], msg_t *msg, struct misdn_b if (cause>0) bc->cause=cause; dec_ie_progress(disconnect->PROGRESS, (Q931_info_t *)disconnect, &bc->progress_coding, &bc->progress_location, &bc->progress_indicator, nt, bc); -#if DEBUG +#ifdef DEBUG printf("Parsing DISCONNECT Msg\n"); #endif @@ -780,7 +780,7 @@ static msg_t *build_disconnect (struct isdn_msg msgs[], struct misdn_bchannel *b enc_ie_cause(&disconnect->CAUSE, msg, (nt)?1:0, bc->out_cause,nt,bc); if (nt) enc_ie_progress(&disconnect->PROGRESS, msg, 0, nt?1:5, 8 ,nt,bc); -#if DEBUG +#ifdef DEBUG printf("Building DISCONNECT Msg\n"); #endif return msg; @@ -793,7 +793,7 @@ static void parse_restart (struct isdn_msg msgs[], msg_t *msg, struct misdn_bcha struct misdn_stack *stack=get_stack_by_bc(bc); -#if DEBUG +#ifdef DEBUG printf("Parsing RESTART Msg\n"); #endif @@ -817,7 +817,7 @@ static msg_t *build_restart (struct isdn_msg msgs[], struct misdn_bchannel *bc, restart=(RESTART_t*)((msg->data+HEADER_LEN)); -#if DEBUG +#ifdef DEBUG printf("Building RESTART Msg\n"); #endif return msg; @@ -832,7 +832,7 @@ static void parse_release (struct isdn_msg msgs[], msg_t *msg, struct misdn_bcha dec_ie_cause(release->CAUSE, (Q931_info_t *)(release), &location, &cause, nt,bc); if (cause>0) bc->cause=cause; -#if DEBUG +#ifdef DEBUG printf("Parsing RELEASE Msg\n"); #endif @@ -850,7 +850,7 @@ static msg_t *build_release (struct isdn_msg msgs[], struct misdn_bchannel *bc, if (bc->out_cause>= 0) enc_ie_cause(&release->CAUSE, msg, nt?1:0, bc->out_cause, nt,bc); -#if DEBUG +#ifdef DEBUG printf("Building RELEASE Msg\n"); #endif return msg; @@ -885,7 +885,7 @@ static void parse_release_complete (struct isdn_msg msgs[], msg_t *msg, struct m dec_ie_cause(release_complete->CAUSE, (Q931_info_t *)(release_complete), &location, &cause, nt,bc); if (cause>0) bc->cause=cause; -#if DEBUG +#ifdef DEBUG printf("Parsing RELEASE_COMPLETE Msg\n"); #endif } @@ -900,7 +900,7 @@ static msg_t *build_release_complete (struct isdn_msg msgs[], struct misdn_bchan enc_ie_cause(&release_complete->CAUSE, msg, nt?1:0, bc->out_cause, nt,bc); -#if DEBUG +#ifdef DEBUG printf("Building RELEASE_COMPLETE Msg\n"); #endif return msg; @@ -914,7 +914,7 @@ static void parse_facility (struct isdn_msg msgs[], msg_t *msg, struct misdn_bch unsigned char *p = NULL; int err; -#if DEBUG +#ifdef DEBUG printf("Parsing FACILITY Msg\n"); #endif @@ -943,7 +943,7 @@ static msg_t *build_facility (struct isdn_msg msgs[], struct misdn_bchannel *bc, FACILITY_t *facility = (FACILITY_t*)(msg->data+HEADER_LEN); Q931_info_t *qi; -#if DEBUG +#ifdef DEBUG printf("Building FACILITY Msg\n"); #endif @@ -971,7 +971,7 @@ static msg_t *build_facility (struct isdn_msg msgs[], struct misdn_bchannel *bc, static void parse_notify (struct isdn_msg msgs[], msg_t *msg, struct misdn_bchannel *bc, int nt) { -#if DEBUG +#ifdef DEBUG printf("Parsing NOTIFY Msg\n"); #endif } @@ -984,7 +984,7 @@ static msg_t *build_notify (struct isdn_msg msgs[], struct misdn_bchannel *bc, i notify=(NOTIFY_t*)((msg->data+HEADER_LEN)); -#if DEBUG +#ifdef DEBUG printf("Building NOTIFY Msg\n"); #endif return msg; @@ -992,7 +992,7 @@ static msg_t *build_notify (struct isdn_msg msgs[], struct misdn_bchannel *bc, i static void parse_status_enquiry (struct isdn_msg msgs[], msg_t *msg, struct misdn_bchannel *bc, int nt) { -#if DEBUG +#ifdef DEBUG printf("Parsing STATUS_ENQUIRY Msg\n"); #endif } @@ -1005,7 +1005,7 @@ static msg_t *build_status_enquiry (struct isdn_msg msgs[], struct misdn_bchanne status_enquiry=(STATUS_ENQUIRY_t*)((msg->data+HEADER_LEN)); -#if DEBUG +#ifdef DEBUG printf("Building STATUS_ENQUIRY Msg\n"); #endif return msg; @@ -1024,7 +1024,7 @@ static void parse_information (struct isdn_msg msgs[], msg_t *msg, struct misdn_ strcpy(bc->info_dad, number); strcpy(bc->keypad,keypad); } -#if DEBUG +#ifdef DEBUG printf("Parsing INFORMATION Msg\n"); #endif } @@ -1048,7 +1048,7 @@ static msg_t *build_information (struct isdn_msg msgs[], struct misdn_bchannel * } } -#if DEBUG +#ifdef DEBUG printf("Building INFORMATION Msg\n"); #endif return msg; @@ -1065,7 +1065,7 @@ static void parse_status (struct isdn_msg msgs[], msg_t *msg, struct misdn_bchan if (cause>0) bc->cause=cause; ; -#if DEBUG +#ifdef DEBUG printf("Parsing STATUS Msg\n"); #endif } @@ -1078,7 +1078,7 @@ static msg_t *build_status (struct isdn_msg msgs[], struct misdn_bchannel *bc, i status=(STATUS_t*)((msg->data+HEADER_LEN)); -#if DEBUG +#ifdef DEBUG printf("Building STATUS Msg\n"); #endif return msg; @@ -1086,7 +1086,7 @@ static msg_t *build_status (struct isdn_msg msgs[], struct misdn_bchannel *bc, i static void parse_timeout (struct isdn_msg msgs[], msg_t *msg, struct misdn_bchannel *bc, int nt) { -#if DEBUG +#ifdef DEBUG printf("Parsing STATUS Msg\n"); #endif } @@ -1099,7 +1099,7 @@ static msg_t *build_timeout (struct isdn_msg msgs[], struct misdn_bchannel *bc, status=(STATUS_t*)((msg->data+HEADER_LEN)); -#if DEBUG +#ifdef DEBUG printf("Building STATUS Msg\n"); #endif return msg; -- cgit v1.2.3