mirror of https://github.com/x64dbg/zydis
Added previously forgotten const qualifiers
- Also, fixed integer comparision warning in `ZydisPerfTest`
This commit is contained in:
parent
4de4def535
commit
95338c59bc
|
@ -393,7 +393,7 @@ int main(int argc, char** argv)
|
|||
}
|
||||
|
||||
rewind(file);
|
||||
if (fread(buffer, 1, length, file) != length)
|
||||
if (fread(buffer, 1, length, file) != (size_t)length)
|
||||
{
|
||||
fprintf(stderr,
|
||||
"Could not read %" PRIu64 " bytes from file \"%s\"", (uint64_t)length, &buf[0]);
|
||||
|
|
|
@ -536,7 +536,7 @@ ZYDIS_EXPORT ZydisStatus ZydisFormatterSetHook(ZydisFormatter* formatter,
|
|||
* @return A zydis status code.
|
||||
*/
|
||||
ZYDIS_EXPORT ZydisStatus ZydisFormatterFormatInstruction(const ZydisFormatter* formatter,
|
||||
ZydisDecodedInstruction* instruction, char* buffer, size_t bufferLen);
|
||||
const ZydisDecodedInstruction* instruction, char* buffer, size_t bufferLen);
|
||||
|
||||
/**
|
||||
* @brief Formats the given instruction and writes it into the output buffer.
|
||||
|
@ -551,7 +551,7 @@ ZYDIS_EXPORT ZydisStatus ZydisFormatterFormatInstruction(const ZydisFormatter* f
|
|||
* @return A zydis status code.
|
||||
*/
|
||||
ZYDIS_EXPORT ZydisStatus ZydisFormatterFormatInstructionEx(const ZydisFormatter* formatter,
|
||||
ZydisDecodedInstruction* instruction, char* buffer, size_t bufferLen, void* userData);
|
||||
const ZydisDecodedInstruction* instruction, char* buffer, size_t bufferLen, void* userData);
|
||||
|
||||
/* ============================================================================================== */
|
||||
|
||||
|
|
|
@ -1074,13 +1074,13 @@ ZydisStatus ZydisFormatterSetHook(ZydisFormatter* formatter, ZydisFormatterHookT
|
|||
}
|
||||
|
||||
ZydisStatus ZydisFormatterFormatInstruction(const ZydisFormatter* formatter,
|
||||
ZydisDecodedInstruction* instruction, char* buffer, size_t bufferLen)
|
||||
const ZydisDecodedInstruction* instruction, char* buffer, size_t bufferLen)
|
||||
{
|
||||
return ZydisFormatterFormatInstructionEx(formatter, instruction, buffer, bufferLen, NULL);
|
||||
}
|
||||
|
||||
ZydisStatus ZydisFormatterFormatInstructionEx(const ZydisFormatter* formatter,
|
||||
ZydisDecodedInstruction* instruction, char* buffer, size_t bufferLen, void* userData)
|
||||
const ZydisDecodedInstruction* instruction, char* buffer, size_t bufferLen, void* userData)
|
||||
{
|
||||
if (!formatter || !instruction || !buffer || (bufferLen == 0))
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue