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
Is your feature request related to a problem? Please describe.
TBL suffers from the unfortunate pattern of run time checks for endian (and associated logic), which leads to uncovered branches and possibly uncovered code (depending on endian of platform).
1158 [ + - ]: 33 : if ((*(char *)&EndianCheck) == 0x04)
1159 : : {
1160 : : /* If this is a little endian processor, then the standard cFE Table Header, */
1161 : : /* which is in big endian format, must be swapped so that the data is readable */
1162 : 33 : CFE_TBL_ByteSwapTblHeader(TblFileHeaderPtr);
1163 : : }
/* Determine if this is a little endian processor */
if ((*(char*)&EndianCheck) ==0x04)
{
/* If this is a little endian processor, then byte swap the header to a big endian format */
/* to maintain the cFE Header standards */
/* NOTE: FOR THE REMAINDER OF THIS FUNCTION, THE CONTENTS OF THE HEADER IS UNREADABLE BY */
/* THIS PROCESSOR! THE DATA WOULD NEED TO BE SWAPPED BACK BEFORE READING. */
CFE_TBL_ByteSwapTblHeader(&TblFileHeader);
}
Describe the solution you'd like
Complete coverage is possible if run on each system, but should be resolved in the future. Possibly in concert with #1209 and related abstraction such that this code doesn't care (whatever underlying API/implementation that handles raw data should do the appropriate conversion).
Is your feature request related to a problem? Please describe.
TBL suffers from the unfortunate pattern of run time checks for endian (and associated logic), which leads to uncovered branches and possibly uncovered code (depending on endian of platform).
cFE/modules/tbl/fsw/src/cfe_tbl_internal.c
Lines 1158 to 1163 in 5e41330
same pattern in:
cFE/modules/tbl/fsw/src/cfe_tbl_task_cmds.c
Lines 740 to 748 in 5e41330
Describe the solution you'd like
Complete coverage is possible if run on each system, but should be resolved in the future. Possibly in concert with #1209 and related abstraction such that this code doesn't care (whatever underlying API/implementation that handles raw data should do the appropriate conversion).
Describe alternatives you've considered
None
Additional context
Same as #1882 for FS
Requester Info
Jacob Hageman - NASA/GSFC
The text was updated successfully, but these errors were encountered: