-
Notifications
You must be signed in to change notification settings - Fork 202
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
remove MESSAGE_FORMAT_IS_CCSDS ifdefs from CFS code #240
Comments
Imported from trac issue 209. Created by cdknight on 2017-10-17T13:30:25, last modified: 2019-04-01T16:34:53 |
Trac comment by tflemin1 on 2017-10-31 14:39:49: The [http://dotat.at/prog/unifdef/ unifdef] tool can automatically remove this sort of conditional, which might be a good first cut at making this change. |
This issue was brought up by IV&V static code analysis, added milestone so priority is raised. Basically if undefined there are code issues (returns within ifdef blocks). |
Issue brought up by JP/PACE. |
@jpswinski - FYI |
Currently, most of the functions in cfe_sb_util.c and a few others are like:
{{{
void CFE_SB_InitMsg(void *MsgPtr,
CFE_SB_MsgId_t MsgId,
uint16 Length,
boolean Clear )
{
#ifdef MESSAGE_FORMAT_IS_CCSDS
#endif
} /* end CFE_SB_InitMsg */
}}}
It's confusing what else would be done in these functions (and nothing else is done.) As Joe said, if someone implemented a wholly different SB message format, they're likely to write their own set of functions and having a bunch of #if/elseif/elseif/elseif/endif blocks would be confusing and difficult to maintain.
The suggestion from the CCB today was to remove these #ifdefs. It might be worthwhile to put in a check at the top of the file that generates a compiler warning/error if it's not defined...
The text was updated successfully, but these errors were encountered: