Skip to content

error: ‘max_length’ may be used uninitialized in this function [-Werror=maybe-uninitialized] #11590

Description

@jczhang07

With ucx-1.21.0, I saw a compile issue. I use gcc-11.4.

proto/proto_select.c: In function ‘ucp_proto_select_elem_init’:
proto/proto_select.c:389:25: error: ‘max_length’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
  389 |     } while (max_length < SIZE_MAX);
      |                         ^
proto/proto_select.c:340:24: note: ‘max_length’ was declared here
  340 |     size_t msg_length, max_length;
      |                        ^~~~~~~~~~
cc1: all warnings being treated as errors
make[2]: *** [Makefile:1371: proto/libucp_la-proto_select.lo] Error 1

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions