Commit 9df30904 authored by Connor Abbott's avatar Connor Abbott

Fix various compiler warnings

Mostly related to wrong printf arguments.
parent bc1ecaae
......@@ -943,7 +943,7 @@ panwrap_replay_vertex_or_tiler_job(const struct mali_job_descriptor_header *h,
panwrap_prop("flags = %d", v->flags);
if (v->unknown6)
panwrap_prop("unknown6 = (unknown6_%d_p) | 0x%X", job_no, v->unknown6 & 0xF);
panwrap_prop("unknown6 = (unknown6_%d_p) | 0x%zX", job_no, v->unknown6 & 0xF);
panwrap_indent--;
panwrap_log("};\n");
......
......@@ -228,7 +228,7 @@ void panwrap_track_mmap(mali_ptr gpu_va, void *addr, size_t length,
/* Map region itself */
panwrap_log("uint32_t *%s = mmap64(NULL, %d, %d, %d, fd, alloc_gpu_va_%d);\n\n",
panwrap_log("uint32_t *%s = mmap64(NULL, %zd, %d, %d, fd, alloc_gpu_va_%d);\n\n",
mapped_mem->name, length, prot, flags, mapped_mem->allocation_number);
panwrap_log("if (%s == MAP_FAILED) printf(\"Error mapping %s\\n\");\n\n",
......@@ -375,7 +375,7 @@ __panwrap_fetch_mem_err(const struct panwrap_mapped_memory *mem,
struct panwrap_mapped_memory *pos;
list_for_each_entry(pos, &mmaps, node) {
panwrap_msg("%llx (%p)\n", pos->gpu_va, pos->addr);
panwrap_msg(MALI_PTR_FMT " (%p)\n", pos->gpu_va, pos->addr);
}
}
......
......@@ -50,12 +50,12 @@ struct panwrap_mapped_memory {
#define DISABLE_CPU_CACHING 1
#define TOUCH_MEMSET(mem, addr, sz, offset) \
memset(mem->touched + (((addr) - mem->gpu_va) / sizeof(uint32_t)), 1, ((sz) - (offset)) / sizeof(uint32_t)); \
memset((mem)->touched + (((addr) - (mem)->gpu_va) / sizeof(uint32_t)), 1, ((sz) - (offset)) / sizeof(uint32_t)); \
panwrap_log("\n");
#define TOUCH_LEN(mem, addr, sz, ename, number, dyn) \
TOUCH_MEMSET(mem, addr, sz, 0) \
panwrap_log("mali_ptr %s_%d_p = pandev_upload(%d, NULL, alloc_gpu_va_%d, %s, &%s_%d, sizeof(%s_%d), false);\n\n", ename, number, dyn ? -1 : (int) (((addr) - mem->gpu_va)), mem->allocation_number, mem->name, ename, number, ename, number);
panwrap_log("mali_ptr %s_%d_p = pandev_upload(%d, NULL, alloc_gpu_va_%d, %s, &%s_%d, sizeof(%s_%d), false);\n\n", ename, number, (dyn) ? -1 : (int) (((addr) - (mem)->gpu_va)), (mem)->allocation_number, (mem)->name, ename, number, ename, number);
/* Job payloads are touched somewhat different than other structures, due to the
* variable lengths and odd packing requirements */
......
......@@ -48,7 +48,7 @@ panwrap_shader_disassemble(mali_ptr shader_ptr, int shader_no, int type)
/* ...but reassemble at runtime! */
panwrap_log("pandev_shader_%s(%s + %d, shader_src_%d, %d);\n\n",
panwrap_log("pandev_shader_%s(%s + %zd, shader_src_%d, %d);\n\n",
type == SHADER_FRAGMENT ? "compile" : "assemble",
shaders->name,
offset / sizeof(uint32_t),
......
......@@ -530,7 +530,7 @@ ioctl_decode_pre_sync(unsigned long int request, void *ptr)
panwrap_prop("handle = %s", a);
free(a);
panwrap_prop("user_addr = %s + %d", mem->name, args->user_addr - mem->addr);
panwrap_prop("user_addr = %s + %zd", mem->name, args->user_addr - mem->addr);
panwrap_prop("type = %s", args->type == MALI_SYNC_TO_DEVICE ? "MALI_SYNC_TO_DEVICE" : "MALI_SYNC_TO_CPU");
}
......
......@@ -7,7 +7,11 @@ srcs = [
'trans-builder.c'
]
X_dep = cc.find_library('X11', required: true)
if is_android
X_dep = []
else
X_dep = cc.find_library('X11', required: true)
endif
executable(
'panloader',
......
#include <X11/Xlib.h>
#include <stdint.h>
#include "slow-framebuffer.h"
#ifndef __ANDROID__
#include <X11/Xlib.h>
Display *d;
Window w;
XImage *image;
......@@ -24,3 +27,13 @@ void slowfb_init(uint8_t *framebuffer, int width, int height) {
void slowfb_update(uint8_t *framebuffer, int width, int height) {
XPutImage(d, w, gc, image, 0, 0, 0, 0, width, height);
}
#else
void slowfb_init(uint8_t *framebuffer, int width, int height) {
}
void slowfb_update(uint8_t *framebuffer, int width, int height) {
}
#endif
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment