mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 19:27:44 +00:00
Everywhere: Fix incorrect uses of String::format and StringBuilder::appendf
These changes are arbitrarily divided into multiple commits to make it easier to find potentially introduced bugs with git bisect.
This commit is contained in:
parent
6d97b623cd
commit
fe2b8906d4
7 changed files with 21 additions and 21 deletions
|
@ -532,7 +532,7 @@ public:
|
|||
|
||||
const String to_string() const
|
||||
{
|
||||
return String::format("[0x%02X] %s", opcode_id(), name(opcode_id()));
|
||||
return String::format("[0x%02X] %s", (int)opcode_id(), name(opcode_id()));
|
||||
}
|
||||
|
||||
virtual const String arguments_string() const = 0;
|
||||
|
@ -618,7 +618,7 @@ public:
|
|||
ALWAYS_INLINE ssize_t offset() const { return argument(0); }
|
||||
const String arguments_string() const override
|
||||
{
|
||||
return String::format("offset=%i [&%lu]", offset(), state().instruction_position + size() + offset());
|
||||
return String::format("offset=%zd [&%zu]", offset(), state().instruction_position + size() + offset());
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -634,7 +634,7 @@ public:
|
|||
ALWAYS_INLINE ssize_t offset() const { return argument(0); }
|
||||
const String arguments_string() const override
|
||||
{
|
||||
return String::format("offset=%i [&%lu], sp: %lu", offset(), state().instruction_position + size() + offset(), state().string_position);
|
||||
return String::format("offset=%zd [&%zu], sp: %zu", offset(), state().instruction_position + size() + offset(), state().string_position);
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -650,7 +650,7 @@ public:
|
|||
ALWAYS_INLINE ssize_t offset() const { return argument(0); }
|
||||
const String arguments_string() const override
|
||||
{
|
||||
return String::format("offset=%i [&%lu], sp: %lu", offset(), state().instruction_position + size() + offset(), state().string_position);
|
||||
return String::format("offset=%zd [&%zu], sp: %zu", offset(), state().instruction_position + size() + offset(), state().string_position);
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -689,7 +689,7 @@ public:
|
|||
ALWAYS_INLINE size_t size() const override { return 2; }
|
||||
ALWAYS_INLINE size_t arguments_count() const { return 1; }
|
||||
ALWAYS_INLINE BoundaryCheckType type() const { return static_cast<BoundaryCheckType>(argument(0)); }
|
||||
const String arguments_string() const override { return String::format("kind=%lu (%s)", argument(0), boundary_check_type_name(type())); }
|
||||
const String arguments_string() const override { return String::format("kind=%lu (%s)", (long unsigned int)argument(0), boundary_check_type_name(type())); }
|
||||
};
|
||||
|
||||
class OpCode_SaveLeftCaptureGroup final : public OpCode {
|
||||
|
@ -748,7 +748,7 @@ public:
|
|||
ALWAYS_INLINE size_t length() const { return argument(1); }
|
||||
const String arguments_string() const override
|
||||
{
|
||||
return String::format("name=%s, length=%lu", name().to_string().characters(), length());
|
||||
return String::format("name=%s, length=%zu", name().to_string().characters(), length());
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue