You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if (!(ENC28_Rcr8(J60_ECON1) &0x10)) // Verify CSUMEN is not set already
{
// Sets CSUMEN and DMAST to select and start a checksum operation
ENC28_Bfs(J60_ECON1, 0x30);
while ((ENC28_Rcr8(J60_ECON1) &0x20) !=0); // Waits until the DMAST bit is clear
ENC28_Bfc(J60_ECON1,0x10);
cksm=ENC28_Rcr16(J60_EDMACSL);
if (seed)
{
seed= ~(seed);
cksm+=seed;
while (cksm >> 16)
{
cksm= (cksm&0x0FFFF) + (cksm >> 16);
}
}
cksm=htons(cksm);
}
return (uint16_t)cksm;
Indeed, it looks like for the false case of line 1188 the variable cksm will remain uninitialized.
I could set it to 0 at declaration time (in line 1178), but what would actually be the right solution?
The text was updated successfully, but these errors were encountered:
Hello,
by porting this lib to STM32 I have the mentioned warning generated by the compiler at this place:
avr-tcpip-lite-enc28j60-solution/enc28j60-avr-tcpserver.X/mcc_generated_files/ethernet/src/enc28j60.c
Lines 1178 to 1207 in 38232b9
Indeed, it looks like for the false case of line 1188 the variable
cksm
will remain uninitialized.I could set it to 0 at declaration time (in line 1178), but what would actually be the right solution?
The text was updated successfully, but these errors were encountered: