cmTimeLine.c,cmAudioPort.c,cmPgmOpts.c,cmProc.c,cmRtSys.c:

Changes to remove compiler warnings on OSX build.
This commit is contained in:
kevin 2013-07-13 17:20:31 -07:00
parent 83baef16a4
commit efd54c7657
5 changed files with 32 additions and 18 deletions

View File

@ -271,7 +271,7 @@ _cmTlObj_t* _cmTlFindRecdBefore( _cmTl_t* p, const _cmTlObj_t* np )
// calc the absolute time of this object
//int absSmpIdx = _cmTlStartTime(np->obj);
int rsi;
int rsi = 0;
_cmTlObj_t* rp = NULL;
_cmTlObj_t* op = p->seq[np->obj->seqId].first;

View File

@ -51,6 +51,10 @@ cmAp_t* _ap = NULL;
cmApRC_t _cmApIndexToDev( unsigned devIdx, cmApDriver_t** drvPtrPtr, unsigned* devIdxPtr )
{
assert( drvPtrPtr != NULL && devIdxPtr != NULL );
*drvPtrPtr = NULL;
*devIdxPtr = cmInvalidIdx;
unsigned i;
for(i=0; i<_ap->drvCnt; ++i)
if( _ap->drvArray[i].begDevIdx != cmInvalidIdx )
@ -204,8 +208,8 @@ unsigned cmApDeviceCount()
const char* cmApDeviceLabel( unsigned devIdx )
{
cmApDriver_t* dp;
unsigned di;
cmApDriver_t* dp = NULL;
unsigned di = cmInvalidIdx;
cmApRC_t rc;
if( devIdx == cmInvalidIdx )
@ -233,8 +237,8 @@ unsigned cmApDeviceLabelToIndex( const cmChar_t* label )
unsigned cmApDeviceChannelCount( unsigned devIdx, bool inputFl )
{
cmApDriver_t* dp;
unsigned di;
cmApDriver_t* dp = NULL;
unsigned di = cmInvalidIdx;
cmApRC_t rc;
if( devIdx == cmInvalidIdx )
@ -248,8 +252,8 @@ unsigned cmApDeviceChannelCount( unsigned devIdx, bool inputFl )
double cmApDeviceSampleRate( unsigned devIdx )
{
cmApDriver_t* dp;
unsigned di;
cmApDriver_t* dp = NULL;
unsigned di = cmInvalidIdx;
cmApRC_t rc;
if((rc = _cmApIndexToDev(devIdx,&dp,&di)) != kOkApRC )
@ -260,8 +264,8 @@ double cmApDeviceSampleRate( unsigned devIdx )
unsigned cmApDeviceFramesPerCycle( unsigned devIdx, bool inputFl )
{
cmApDriver_t* dp;
unsigned di;
cmApDriver_t* dp = NULL;
unsigned di = cmInvalidIdx;
cmApRC_t rc;
if( devIdx == cmInvalidIdx )

View File

@ -856,6 +856,9 @@ cmPoRC_t _cmPgmOptIndexToPtr( _cmPo_t* p, unsigned idx, const _cmPoArg_t** app
unsigned n = 0;
const _cmPoArg_t* a = p->args;
assert(app != NULL );
*app = NULL;
while( a != NULL && n < idx )
{
++n;
@ -872,28 +875,31 @@ cmPoRC_t _cmPgmOptIndexToPtr( _cmPo_t* p, unsigned idx, const _cmPoArg_t** app
unsigned cmPgmOptNumId( cmPgmOptH_t h, unsigned argIdx )
{
const _cmPoArg_t* a;
const _cmPoArg_t* a = NULL;
cmPoRC_t rc;
if((rc = _cmPgmOptIndexToPtr(_cmPoHandleToPtr(h),argIdx,&a)) != kOkPoRC )
return cmInvalidId;
assert( a != NULL );
return a->opt->numId;
}
unsigned cmPgmOptCharId( cmPgmOptH_t h, unsigned argIdx )
{
const _cmPoArg_t* a;
const _cmPoArg_t* a = NULL;
cmPoRC_t rc;
if((rc = _cmPgmOptIndexToPtr(_cmPoHandleToPtr(h),argIdx,&a)) != kOkPoRC )
return cmInvalidId;
assert(a != NULL );
return a->opt->charId;
}
const cmChar_t* cmPgmOptWordId( cmPgmOptH_t h, unsigned argIdx )
{
const _cmPoArg_t* a;
const _cmPoArg_t* a = NULL;
cmPoRC_t rc;
if((rc = _cmPgmOptIndexToPtr(_cmPoHandleToPtr(h),argIdx,&a)) != kOkPoRC )
return NULL;
assert(a!=NULL);
return a->opt->wordId;
}

View File

@ -2437,7 +2437,7 @@ void cmScMatcherPrint( cmScMatcher* p )
// if this result did not match a score event
if( cmIsFlag(rp->flags,kSmFalsePosFl) )
{
unsigned d_min;
unsigned d_min = 0;
cmScMatcherPrint_t* dp = NULL;
unsigned scLocIdx = cmInvalidIdx;
@ -3942,6 +3942,8 @@ cmRC_t _cmScModGetParam( cmScModulator* p, const cmScModParam_t* pp, double* va
switch( pp->pid )
{
case kInvalidModPId:
rc = cmCtxRtCondition( &p->obj, cmInvalidArgRC, "An invalid parameter was encountered.");
goto errLabel;
break;
case kLiteralModPId:
@ -4059,7 +4061,7 @@ bool _cmScModExec( cmScModulator* p, cmScModVar_t* vp )
case kSetLineModTId:
case kLineModTId:
{
double v1, td;
double v1=0, td=0;
// get the target value
if((rc = _cmScModGetParam(p,&vp->entry->end,&v1)) != cmOkRC)

View File

@ -1464,6 +1464,8 @@ void cmRtSysTest( cmCtx_t* ctx, int argc, const char* argv[] )
cmRtSysStatus_t status;
_cmRtTestCbRecd cbRecd = {1000.0,0,48000.0,0};
cmRpt_t* rpt = &ctx->rpt;
memset(&status,0,sizeof(status));
unsigned meterMs = 50;
unsigned ssCnt = 1;