This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Warning L13: recursive call to segment

Hello,

I have the following piece of code:

/*-------------------------------------------------------------------------*/
extern byte i2c_swi2c_Write( byte address, byte *msgw, byte len )
/*-------------------------------------------------------------------------*/
{
    ASSERT( ( address >= 0 ) && ( address <= 255 ) );
    ASSERT( msgw != NULL );
    ASSERT( ( len > 0 ) && ( len <= 255 ) );
    return ( I2cCommand( address, len, 0, msgw, NULL ) );
}

This function is called by different other modules, but modules within the same process (so, no mix from interrupt and non-interrupt code, which means that reentrancy is not the case here). There seems to be only one simple call to a local static function I2cCommand, with the following prototype:
static byte I2cCommand( byte Address
                      , byte NrSend
                      , byte NrRec
                      , byte *SendBuffer
                      , byte *RecBuffer
                      );

However, I get the following (if it is true, dangerous) warning:

*** WARNING L13: RECURSIVE CALL TO SEGMENT
SEGMENT: ?PR?_I2CCOMMAND?I2C_M
CALLER: ?PR?_I2C_SWI2C_WRITE?I2C_M


The problem is that I don't see any recursivity at all. To me, it's a straightforward call from an externally accessible function to a locally accessible function. Does someone see the recursivity?


Rgds,

Geert

Parents Reply Children
No data