In 64bit build system, uint64_t is mapped to unsigned long int.
Therefore, when printing uint64_t, it should be cast as unsigned long long.
Logs:
[ 209s] /home/abuild/rpmbuild/BUILD/launchpad-0.34.0/src/app-defined-loader/app-defined-loader.cc: In member function 'void launchpad::loader::AppDefinedLoader::PreloadLib(tizen_base::Bundle)':
[ 209s] /usr/include/dlog/dlog-internal.h:72:31: error: format '%llu' expects argument of type 'long long unsigned int', but argument 8 has type 'uint64_t' {aka 'long unsigned int'} [-Werror=format=]
Change-Id: Ia59a6f765d70040037a031a0715a7622166e19fb
Signed-off-by: Changgyu Choi <changyu.choi@samsung.com>
uint64_t pss;
launchpad::Procfs::GetPssMemory(getpid(), &pss);
if (pss > threshold_) {
- _W("Pss(%llu) is over threshold(%llu)", pss, threshold_);
+ _W("Pss(%llu) is over threshold(%llu)",
+ static_cast<unsigned long long>(pss),
+ static_cast<unsigned long long>(threshold_));
break;
}
}
uint64_t mem_pss;
launchpad::Procfs::GetPssMemory(getpid(), &mem_pss);
- _W("PSS: %llu kB", mem_pss);
+ _W("PSS: %llu kB", static_cast<unsigned long long>(mem_pss));
for (auto& lib : libs) {
if (lib.empty())
continue;
}
launchpad::Procfs::GetPssMemory(getpid(), &mem_pss);
- _W("Preload %s# - handle: %p, PSS: %llu kB", lib.c_str(), handle, mem_pss);
+ _W("Preload %s# - handle: %p, PSS: %llu kB", lib.c_str(), handle,
+ static_cast<unsigned long long>(mem_pss));
}
}