diff options
| author | Alexey Kardashevskiy <aik@linux.ibm.com> | 2020-09-02 18:16:10 +1000 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2020-10-26 10:19:14 +0100 |
| commit | fec51a2362eb35edd596ae6b6117c668b6e8a539 (patch) | |
| tree | a67628f412197916a8546f219a223bffc4653d79 /executor/test_linux.h | |
| parent | a1839e81524f4e427a4b57bca0e4633d459d3d18 (diff) | |
executor: compile fix
This fixes an error in printf() format for __u64:
gcc -o ./bin/linux_ppc64le/syz-executor executor/executor.cc \
-D__powerpc64__ -O2 -pthread -Wall -Werror -Wparentheses \
-Wunused-const-variable -Wframe-larger-than=16384
-static -DGOOS_linux=1 -DGOARCH_ppc64le=1 \
-DHOSTGOOS_linux=1 \
-DGIT_REVISION=\"82d2e60626ef1f43e557ca2933aee53bd5265eaf+\"
In file included from executor/test.h:5:0,
from executor/executor.cc:343:
executor/test_linux.h: In function ‘int test_one(int, const char*, int, \
int, unsigned int, bool)’:
executor/test_linux.h:74:60: error: format ‘%llx’ expects argument of type \
‘long long unsigned int’, but argument
2 has type ‘__u64 {aka long unsigned int}’ [-Werror=format=]
cpu_mem->fail_entry.hardware_entry_failure_reason);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
Signed-off-by: Alexey Kardashevskiy <aik@linux.ibm.com>
Diffstat (limited to 'executor/test_linux.h')
| -rw-r--r-- | executor/test_linux.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/executor/test_linux.h b/executor/test_linux.h index 96e185175..fcd8d855e 100644 --- a/executor/test_linux.h +++ b/executor/test_linux.h @@ -71,7 +71,7 @@ static int test_one(int text_type, const char* text, int text_size, int flags, u printf("KVM_RUN exit reason %d, expect %d\n", cpu_mem->exit_reason, reason); if (cpu_mem->exit_reason == KVM_EXIT_FAIL_ENTRY) printf("hardware exit reason 0x%llx\n", - cpu_mem->fail_entry.hardware_entry_failure_reason); + (unsigned long long)cpu_mem->fail_entry.hardware_entry_failure_reason); dump_cpu_state(cpufd, (char*)vm_mem); return 1; } |
