Local variable Size is only written and causes compiler warning (#670)

This commit is contained in:
Torsten Robitzki 2022-12-02 19:03:35 +01:00 committed by GitHub
parent 6a5babfec9
commit a901500618
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 3 deletions

View File

@ -394,7 +394,7 @@ int si_map_sdo(int slave)
int si_siiPDO(uint16 slave, uint8 t, int mapoffset, int bitoffset)
{
uint16 a , w, c, e, er, Size;
uint16 a , w, c, e, er;
uint8 eectl;
uint16 obj_idx;
uint8 obj_subidx;
@ -408,7 +408,7 @@ int si_siiPDO(uint16 slave, uint8 t, int mapoffset, int bitoffset)
char str_name[EC_MAXNAME + 1];
eectl = ec_slave[slave].eep_pdi;
Size = 0;
totalsize = 0;
PDO = &eepPDO;
PDO->nPDO = 0;
@ -480,7 +480,6 @@ int si_siiPDO(uint16 slave, uint8 t, int mapoffset, int bitoffset)
totalsize += bitlen;
}
PDO->SMbitsize[ PDO->SyncM[PDO->nPDO] ] += PDO->BitSize[PDO->nPDO];
Size += PDO->BitSize[PDO->nPDO];
c++;
}
else /* PDO deactivated because SM is 0xff or > EC_MAXSM */