Skip to content
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

Return code not passed back in OS_ConsoleAPI_Init - static analysis warning #790

Closed
skliper opened this issue Feb 10, 2021 · 1 comment · Fixed by #792 or #774
Closed

Return code not passed back in OS_ConsoleAPI_Init - static analysis warning #790

skliper opened this issue Feb 10, 2021 · 1 comment · Fixed by #792 or #774

Comments

@skliper
Copy link
Contributor

skliper commented Feb 10, 2021

Is your feature request related to a problem? Please describe.
OS_ConsoleAPI_Init always returns success, but could error. Inconsistently implemented (if return_code is being recorded, return it... if it isn't needed why set it?)

Describe the solution you'd like
Either don't have a return value, or return the actual status. In test/coverage the expected return value should be confirmed.

Describe alternatives you've considered
None

Additional context
Static analysis warning since return_code is unused

Requester Info
Jacob Hageman - NASA/GSFC

@skliper skliper added this to the 6.0.0 milestone Feb 10, 2021
@skliper
Copy link
Contributor Author

skliper commented Feb 10, 2021

Note the return code is checked and reported, just would have never reported the error:

case OS_OBJECT_TYPE_OS_CONSOLE:
return_code = OS_ConsoleAPI_Init();
break;
default:
break;
}
if (return_code != OS_SUCCESS)
{
OS_DEBUG("ID type 0x%x shared layer failed to initialize: %d\n", (unsigned int)idtype, (int)return_code);

skliper added a commit to skliper/osal that referenced this issue Feb 10, 2021
astrogeco added a commit that referenced this issue Feb 12, 2021
Fix #790, Return status from OS_ConsoleAPI_Init
jphickey added a commit to jphickey/osal that referenced this issue Aug 10, 2022
Checks a name-based subdirectory under ${MISSION_DEFS} for
files listed in the FILELIST for that target.

If file is a symlink, the link should be followed so the correct
content is installed, not a symlink.
jphickey pushed a commit to jphickey/osal that referenced this issue Aug 10, 2022
Fix nasa#790, allow directories and symlinks in FILELIST.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants