Skip to content

build warning on Mac #1106

@songqing

Description

@songqing

Common warning between Linux and Mac

In file included from yalantinglibs/include/ylt/metric.hpp:22:
yalantinglibs/include/ylt/metric/system_metric.hpp:185:41: warning: format specifies type 'long *' but the argument has type 'int64_t *' (aka 'long long *') [-Wformat]
  185 |   if (sscanf(result.c_str(), "%ld %ld", &resident, &virtual_size) != 2) {
      |                               ~~~       ^~~~~~~~~
      |                               %lld
yalantinglibs/include/ylt/metric/system_metric.hpp:185:52: warning: format specifies type 'long *' but the argument has type 'int64_t *' (aka 'long long *') [-Wformat]
  185 |   if (sscanf(result.c_str(), "%ld %ld", &resident, &virtual_size) != 2) {
      |                                   ~~~              ^~~~~~~~~~~~~
      |                                   %lld

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions