-
Notifications
You must be signed in to change notification settings - Fork 57
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
recommended lgtm issues: #126
Comments
Definitely worth clarifying. PSP/fsw/shared/cfe_psp_module.h Lines 36 to 43 in 502e83a
Should be understandable at a quick glance. @jphickey any suggestions? Not clear to me what the intent is here. |
It is simply intended to provide unique(-ish) numeric values for the valid enumerators. If every enumeration in the system starts with 1, then it is easy to interchange. Using a starting value other than 1 offers a modicum of protection against using incorrect values (i.e. if someone passed a pointer to the wrong struct, or something). I'm not sure why this is an lgtm "issue" as it is pretty well defined in the C standard how enum declarations work. But if you'd rather start with 1, it won't change the behavior, but it will make it a little less secure. |
Avoids irregular enum warning
Avoids irregular enum warning
Fix #126, Refactor CFE_PSP_ModuleType_t enum
Is your feature request related to a problem? Please describe.
Recommended issue from lgtm:
cfe_psp_module.h
The text was updated successfully, but these errors were encountered: