[asterisk-dev] [svn-commits] pabelanger: branch 1.8 r355700 - in /branches/1.8/addons: ./ ooh323c/src/

Richard Mudgett rmudgett at digium.com
Thu Feb 16 18:09:19 CST 2012


You deleted too much out of ooTimer.c.  You deleted the callback and not the setting of the return value.

Ricahrd

----- Original Message -----
> Author: pabelanger
> Date: Thu Feb 16 17:53:08 2012
> New Revision: 355700
> 
> URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=355700
> Log:
> Fix -Werror=unused-but-set-variable compiler error (gcc 4.6.2)
> 
> Modified:
>     branches/1.8/addons/ooh323c/src/ooCapability.c
>     branches/1.8/addons/ooh323c/src/ooSocket.c
>     branches/1.8/addons/ooh323c/src/ooTimer.c
>     branches/1.8/addons/ooh323c/src/ooq931.c
>     branches/1.8/addons/ooh323c/src/perutil.c
>     branches/1.8/addons/ooh323cDriver.c
> 
> Modified: branches/1.8/addons/ooh323c/src/ooCapability.c
> URL:
> http://svnview.digium.com/svn/asterisk/branches/1.8/addons/ooh323c/src/ooCapability.c?view=diff&rev=355700&r1=355699&r2=355700
> ==============================================================================
> --- branches/1.8/addons/ooh323c/src/ooCapability.c (original)
> +++ branches/1.8/addons/ooh323c/src/ooCapability.c Thu Feb 16
> 17:53:08 2012
> @@ -1104,14 +1104,12 @@
>     (ooH323EpCapability *epCap, OOCTXT* pctxt, int dir)
>  {
>     H245AudioCapability *pAudio=NULL;
> -   OOCapParams *params;
>     if(!epCap || !epCap->params)
>     {
>       OOTRACEERR1("Error:Invalid capability parameters to "
>                   "ooCapabilityCreateSimpleCapability.\n");
>       return NULL;
>     }
> -   params =(OOCapParams*)epCap->params;
>     pAudio = (H245AudioCapability*)memAlloc(pctxt,
>                                                  sizeof(H245AudioCapability));
>     if(!pAudio)
> @@ -1228,7 +1226,6 @@
>     (ooH323EpCapability *epCap, OOCTXT* pctxt, int dir)
>  {
>     H245DataApplicationCapability *pT38=NULL;
> -   OOCapParams *params;
>     H245DataMode_application *pT38app;
>     if(!epCap || !epCap->params)
>     {
> @@ -1236,7 +1233,6 @@
>                   "ooCapabilityCreateSimpleCapability.\n");
>       return NULL;
>     }
> -   params =(OOCapParams*)epCap->params;
>     pT38 = (H245DataApplicationCapability*)memAlloc(pctxt,
>                                                  sizeof(H245DataApplicationCapability));
>     if(!pT38)
> 
> Modified: branches/1.8/addons/ooh323c/src/ooSocket.c
> URL:
> http://svnview.digium.com/svn/asterisk/branches/1.8/addons/ooh323c/src/ooSocket.c?view=diff&rev=355700&r1=355699&r2=355700
> ==============================================================================
> --- branches/1.8/addons/ooh323c/src/ooSocket.c (original)
> +++ branches/1.8/addons/ooh323c/src/ooSocket.c Thu Feb 16 17:53:08
> 2012
> @@ -252,8 +252,6 @@
>        OOTRACEERR1("Error:Failed to set socket option
>        SO_REUSEADDR\n");
>        return ASN_E_INVSOCKET;
>     }
> -   linger.l_onoff = 1;
> -   linger.l_linger = 0;
>     /*if (setsockopt (sock, SOL_SOCKET, SO_LINGER,
>                   (const char* ) &linger, sizeof (linger)) == -1)
>        return ASN_E_INVSOCKET;
> 
> Modified: branches/1.8/addons/ooh323c/src/ooTimer.c
> URL:
> http://svnview.digium.com/svn/asterisk/branches/1.8/addons/ooh323c/src/ooTimer.c?view=diff&rev=355700&r1=355699&r2=355700
> ==============================================================================
> --- branches/1.8/addons/ooh323c/src/ooTimer.c (original)
> +++ branches/1.8/addons/ooh323c/src/ooTimer.c Thu Feb 16 17:53:08
> 2012
> @@ -101,7 +101,6 @@
>  void ooTimerFireExpired (OOCTXT* pctxt, DList *pList)
>  {
>     OOTimer* pTimer;
> -   int stat;
>  
>     while (pList->count > 0) {
>        pTimer = (OOTimer*) pList->head->data;
> @@ -112,8 +111,6 @@
>            * a long duration callback.
>            */
>           if (pTimer->reRegister) ooTimerReset (pctxt, pList,
>           pTimer);
> -
> -         stat = (*pTimer->timeoutCB)(pTimer->cbData);
>  
>           if (!pTimer->reRegister) {
>              ooTimerDelete (pctxt, pList, pTimer);
> 
> Modified: branches/1.8/addons/ooh323c/src/ooq931.c
> URL:
> http://svnview.digium.com/svn/asterisk/branches/1.8/addons/ooh323c/src/ooq931.c?view=diff&rev=355700&r1=355699&r2=355700
> ==============================================================================
> --- branches/1.8/addons/ooh323c/src/ooq931.c (original)
> +++ branches/1.8/addons/ooh323c/src/ooq931.c Thu Feb 16 17:53:08 2012
> @@ -2183,7 +2183,7 @@
>     ooAliases *pNewAlias=NULL, *alias=NULL;
>     struct timespec ts;
>     struct timeval tv;
> -   int i=0, irand=0, ret = OO_OK;
> +   int i=0, irand=0;
>     /* Note: We keep same callToken, for new call which is going
>        to replace an existing call, thus treating it as a single
>        call.*/
>  
> @@ -2235,7 +2235,7 @@
>     {
>       /* No need to check registration status here as it is already
>       checked for
>          MakeCall command */
> -      ret = ooGkClientSendAdmissionRequest(gH323ep.gkClient,
> fwdedCall, FALSE);
> +      ooGkClientSendAdmissionRequest(gH323ep.gkClient, fwdedCall,
> FALSE);
>        fwdedCall->callState = OO_CALL_WAITING_ADMISSION;
>        ast_mutex_lock(&fwdedCall->Lock);
>  	  tv = ast_tvnow();
> @@ -2249,7 +2249,7 @@
>     }
>     if (fwdedCall->callState < OO_CALL_CLEAR) {
>        ast_mutex_lock(&fwdedCall->Lock);
> -      ret = ooH323CallAdmitted (fwdedCall);
> +      ooH323CallAdmitted (fwdedCall);
>        ast_mutex_unlock(&fwdedCall->Lock);
>     }
>  
> @@ -2276,7 +2276,6 @@
>  
>  int ooH323MakeCall(char *dest, char *callToken, ooCallOptions *opts)
>  {
> -   OOCTXT *pctxt;
>     OOH323CallData *call;
>     int ret=OO_OK, i=0, irand=0;
>     char tmp[30]="\0";
> @@ -2303,7 +2302,6 @@
>        return OO_FAILED;
>     }
>  
> -   pctxt = call->pctxt;
>     if(opts)
>     {
>        if(opts->fastStart)
> 
> Modified: branches/1.8/addons/ooh323c/src/perutil.c
> URL:
> http://svnview.digium.com/svn/asterisk/branches/1.8/addons/ooh323c/src/perutil.c?view=diff&rev=355700&r1=355699&r2=355700
> ==============================================================================
> --- branches/1.8/addons/ooh323c/src/perutil.c (original)
> +++ branches/1.8/addons/ooh323c/src/perutil.c Thu Feb 16 17:53:08
> 2012
> @@ -168,7 +168,7 @@
>  int checkSizeConstraint(OOCTXT* pctxt, int size)
>  {
>     Asn1SizeCnst* pSize;
> -   ASN1UINT lower, upper;
> +   ASN1UINT upper;
>     ASN1BOOL extbit;
>     int      stat;
>  
> @@ -186,7 +186,6 @@
>  
>     pSize = getSizeConstraint (pctxt, extbit);
>  
> -   lower = (pSize) ? pSize->lower : 0;
>     upper = (pSize) ? pSize->upper : ASN1UINT_MAX;
>  
>     if (upper < (ASN1UINT)size) {
> 
> Modified: branches/1.8/addons/ooh323cDriver.c
> URL:
> http://svnview.digium.com/svn/asterisk/branches/1.8/addons/ooh323cDriver.c?view=diff&rev=355700&r1=355699&r2=355700
> ==============================================================================
> --- branches/1.8/addons/ooh323cDriver.c (original)
> +++ branches/1.8/addons/ooh323cDriver.c Thu Feb 16 17:53:08 2012
> @@ -82,7 +82,6 @@
>   struct callthread* mycthread = (struct callthread *)dummy;
>   struct pollfd pfds[1];
>   char c;
> - int res;
>  
>   do {
>  
> @@ -101,7 +100,7 @@
>  	pfds[0].events = POLLIN;
>  	ooSocketPoll(pfds, 1, SEC_TO_HOLD_THREAD * 1000);
>  	if (ooPDRead(pfds, 1, mycthread->thePipe[0]))
> -		res = read(mycthread->thePipe[0], &c, 1);
> +		read(mycthread->thePipe[0], &c, 1);
>  
>   	ast_mutex_lock(&callThreadsLock);
>  	ast_mutex_lock(&mycthread->lock);
> @@ -129,7 +128,6 @@
>  
>  int ooh323c_start_call_thread(ooCallData *call) {
>   char c = 'c';
> - int res;
>   struct callthread *cur = callThreads;
>  
>   ast_mutex_lock(&callThreadsLock);
> @@ -182,7 +180,7 @@
>  		ast_debug(1,"using existing call thread for call %s\n",
>  		call->callToken);
>  	cur->inUse = TRUE;
>  	cur->call = call;
> -	res = write(cur->thePipe[1], &c, 1);
> +	write(cur->thePipe[1], &c, 1);
>  	ast_mutex_unlock(&cur->lock);
>  
>   }
> 
> 
> --
> _____________________________________________________________________
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
> 
> svn-commits mailing list
> To UNSUBSCRIBE or update options visit:
>    http://lists.digium.com/mailman/listinfo/svn-commits
> 



More information about the asterisk-dev mailing list