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

osal lgtm warning #328

Closed
avan989 opened this issue Dec 23, 2019 · 0 comments · Fixed by #355
Closed

osal lgtm warning #328

avan989 opened this issue Dec 23, 2019 · 0 comments · Fixed by #355
Milestone

Comments

@avan989
Copy link
Contributor

avan989 commented Dec 23, 2019

Describe the bug
Reference issue #320.

os-impl-bsd-sockets.c

line 217, 568:
if (addrlen == 0 \|\| addrlen > OS_SOCKADDR_MAX_LEN)
--
  | Comparison is always false because addrlen <= 28.

line 574:
Accessor->sockaddr.sa_family = sa_family;
--
  | The variable sa_family may not be initialized here.

shared/osapi-idmap.c


line 529:
return_code = OS_ObjectIdMap(idtype, idvalue, &obj->active_id);
--
  | The variable obj may not be initialized here.

line: 545
*array_index = local_id;
--
  | The variable local_id may not be initialized here.

line 549:
*record = obj;
--
  | The variable obj may not be initialized here.

shared/osapi-sockets.c

return_code = OS_SocketAccept_Impl(local_id, conn_id, Addr, timeout);
--
  | The variable conn_id may not be initialized here.

shared/osapi-time.c

line 466:
OS_ObjectIdRefcountDecr(timebase);
--
  | The variable timebase may not be initialized here.

os-posix.h

This header file should contain a header guard to prevent multiple inclusion.

Reporter Info
Anh Van, NASA Goddard.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants