Skip to content

osal lgtm warning  #328

@avan989

Description

@avan989

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions