Skip to content

Compiler warning in src/heap_utils.cc #43577

@targos

Description

@targos
[2349/3775] CXX obj/src/libnode.heap_utils.o
../../src/heap_utils.cc:248:7: warning: comparison of integers of different signs: 'const int' and 'const size_t' (aka 'const unsigned long') [-Wsign-compare]
      DCHECK_LE(num_bytes_written, buf.len);
      ^         ~~~~~~~~~~~~~~~~~  ~~~~~~~
../../src/util.h:173:37: note: expanded from macro 'DCHECK_LE'
  #define DCHECK_LE(a, b) CHECK((a) <= (b))
                                 ~  ^   ~
../../src/util.h:153:20: note: expanded from macro 'CHECK'
    if (UNLIKELY(!(expr))) {                                                  \
                   ^~~~
../../src/util.h:140:44: note: expanded from macro 'UNLIKELY'
#define UNLIKELY(expr) __builtin_expect(!!(expr), 0)
                                           ^~~~
1 warning generated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    buildIssues and PRs related to build files or the CI.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions