Created
August 27, 2015 04:32
-
-
Save aquynh/58f83e579f6d32695e58 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cc -I../include -L.. -lunicorn ro_mem_test.c -o ro_mem_test | |
ro_mem_test.c:41:40: warning: passing 'char [16]' to parameter of type 'const uint8_t *' (aka 'const unsigned char *') converts between pointers to integer types with different | |
sign [-Wpointer-sign] | |
if (uc_mem_write(handle, 0x400000, PROGRAM, sizeof(PROGRAM))) { | |
^~~~~~~ | |
ro_mem_test.c:7:17: note: expanded from macro 'PROGRAM' | |
#define PROGRAM "\xeb\x08\x58\xc7\x00\x78\x56\x34\x12\x90\xe8\xf3\xff\xff\xff" | |
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
../include/unicorn/unicorn.h:306:66: note: passing argument to parameter 'bytes' here | |
uc_err uc_mem_write(uch handle, uint64_t address, const uint8_t *bytes, size_t size); | |
^ | |
ro_mem_test.c:59:57: warning: format specifies type 'unsigned int' but the argument has type 'unsigned long' [-Wformat] | |
printf(">>> Read 4 bytes from [0x%x] = 0x%x\n", 0x400000 + sizeof(PROGRAM) - 1,*(uint32_t*) bytes); | |
~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
%lx | |
ro_mem_test.c:61:60: warning: format specifies type 'unsigned int' but the argument has type 'unsigned long' [-Wformat] | |
printf(">>> Failed to read 4 bytes from [0x%x]\n", 0x400000 + sizeof(PROGRAM) - 1); | |
~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
%lx | |
3 warnings generated. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment