Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

src: fix some compiler warnings #385

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/llv8-inl.h
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ inline T LLV8::LoadValue(int64_t addr, Error& err) {
#else
#define _s "value"
#endif
err = Error(true, "The value %lx is not a valid %s", addr, _s);
err = Error(true, "The value %" PRId64 " is not a valid %s", addr, _s);
#undef _s
return T();
}
Expand Down
8 changes: 4 additions & 4 deletions src/llv8.cc
Original file line number Diff line number Diff line change
Expand Up @@ -937,7 +937,7 @@ std::vector<std::pair<Value, Value>> JSObject::DescriptorEntries(Map map,
for (int64_t i = 0; i < own_descriptors_count; i++) {
Smi details = descriptors.GetDetails(i);
if (!details.Check()) {
PRINT_DEBUG("Failed to get details for index %ld", i);
PRINT_DEBUG("Failed to get details for index %" PRId64, i);
entries.push_back(std::pair<Value, Value>(Value(), Value()));
continue;
}
Expand Down Expand Up @@ -1043,7 +1043,7 @@ void JSObject::DescriptorKeys(std::vector<std::string>& keys, Map map,
for (int64_t i = 0; i < own_descriptors_count; i++) {
Smi details = descriptors.GetDetails(i);
if (!details.Check()) {
PRINT_DEBUG("Failed to get details for index %ld", i);
PRINT_DEBUG("Failed to get details for index %" PRId64, i);
keys.push_back("???");
continue;
}
Expand Down Expand Up @@ -1145,7 +1145,7 @@ Value JSObject::GetDescriptorProperty(std::string key_name, Map map,
for (int64_t i = 0; i < own_descriptors_count; i++) {
Smi details = descriptors.GetDetails(i);
if (!details.Check()) {
PRINT_DEBUG("Failed to get details for index %ld", i);
PRINT_DEBUG("Failed to get details for index %" PRId64, i);
continue;
}

Expand Down Expand Up @@ -1322,7 +1322,7 @@ StackTrace::StackTrace(JSArray frame_array, Error& err)
((frame_array_.GetArrayLength(err) - 1) % multiplier_ != 0)) {
PRINT_DEBUG(
"JSArray doesn't look like a Stack Frames array. stack_len: %d "
"array_len: %ld",
"array_len: %" PRId64,
len_, frame_array_.GetArrayLength(err));
len_ = -1;
multiplier_ = -1;
Expand Down
4 changes: 2 additions & 2 deletions src/printer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -999,7 +999,7 @@ std::string Printer::StringifyDescriptors(v8::JSObject js_object, v8::Map map,
if (key.Check()) {
ss << key.ToString(err);
} else {
PRINT_DEBUG("Failed to get key for index %ld", i);
PRINT_DEBUG("Failed to get key for index %" PRId64, i);
ss << "???";
}
ss << rang::fg::reset << rang::style::reset;
Expand All @@ -1009,7 +1009,7 @@ std::string Printer::StringifyDescriptors(v8::JSObject js_object, v8::Map map,

v8::Smi details = descriptors.GetDetails(i);
if (!details.Check()) {
PRINT_DEBUG("Failed to get details for index %ld", i);
PRINT_DEBUG("Failed to get details for index %" PRId64, i);
res += "???";
continue;
}
Expand Down