-
Notifications
You must be signed in to change notification settings - Fork 253
Description
Is your feature request related to a problem? Please describe.
Numerous false alarms on possible uninitialized variable with OS_OpenCreate use.
Describe the solution you'd like
Initialize the file descriptor to OS_OBJECT_ID_UNDEFINED:
osal/src/os/shared/src/osapi-file.c
Lines 106 to 115 in 98a2516
| int32 OS_OpenCreate(osal_id_t *filedes, const char *path, int32 flags, int32 access) | |
| { | |
| int32 return_code; | |
| char local_path[OS_MAX_LOCAL_PATH_LEN]; | |
| OS_object_token_t token; | |
| OS_stream_internal_record_t *stream; | |
| /* Check parameters */ | |
| OS_CHECK_POINTER(filedes); | |
Describe alternatives you've considered
Could initialize before passing in from each call, but this would provide consistency
Additional context
Static analysis warnings (on use)
Requester Info
Jacob Hageman - NASA/GSFC
Reactions are currently unavailable