From ad6fa8332a0f8ccdc3deac7b69a25ba41ee39566 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Fr=C3=A9d=C3=A9ric=20Dalleau?= Date: Wed, 4 Sep 2013 12:16:17 +0200 Subject: [PATCH] VirtGL: Fix warnings in helper_opengl.h Declare decode_call_int in a dedicated header file helper_opengl.h Use it from files that need it. Since decode_call_int declaration required ProcessStruct, opengl_process.h must be protected from multiple inclusions. Change-Id: I3329eaf5e4de8882ebb21dc50c2c5040cbbadb9d Conflicts: tizen/src/hw/virtio-gl.c --- tizen/src/hw/helper_opengl.c | 1 + tizen/src/hw/helper_opengl.h | 27 +++++++++++++++++++++++++++ tizen/src/hw/opengl_process.h | 4 ++++ tizen/src/hw/virtio-gl.c | 1 + 4 files changed, 33 insertions(+) create mode 100644 tizen/src/hw/helper_opengl.h diff --git a/tizen/src/hw/helper_opengl.c b/tizen/src/hw/helper_opengl.c index 431c512a82..3cab342b6a 100644 --- a/tizen/src/hw/helper_opengl.c +++ b/tizen/src/hw/helper_opengl.c @@ -34,6 +34,7 @@ #include "opengl_func.h" #include "opengl_process.h" #include "opengl_exec.h" +#include "helper_opengl.h" #include "tizen/src/debug_ch.h" MULTI_DEBUG_CHANNEL(qemu, opengl); diff --git a/tizen/src/hw/helper_opengl.h b/tizen/src/hw/helper_opengl.h new file mode 100644 index 0000000000..8111cbafc9 --- /dev/null +++ b/tizen/src/hw/helper_opengl.h @@ -0,0 +1,27 @@ +/* + * Host-side implementation of GL/GLX API + * + * Copyright (c) 2013 Intel Corporation + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#include "opengl_process.h" + +int decode_call_int(ProcessStruct *p, char *in_args, int args_len, char *r_buffer); diff --git a/tizen/src/hw/opengl_process.h b/tizen/src/hw/opengl_process.h index 5a923878fe..55eccdaa51 100644 --- a/tizen/src/hw/opengl_process.h +++ b/tizen/src/hw/opengl_process.h @@ -22,6 +22,9 @@ * THE SOFTWARE. */ +#ifndef __OPENGL_PROCESS_H +#define __OPENGL_PROCESS_H + typedef struct { int process_id; int wordsize; @@ -31,3 +34,4 @@ typedef struct { char *rrq, *rrq_p; } ProcessStruct; +#endif diff --git a/tizen/src/hw/virtio-gl.c b/tizen/src/hw/virtio-gl.c index b1dc32b84b..366bb8cdfe 100644 --- a/tizen/src/hw/virtio-gl.c +++ b/tizen/src/hw/virtio-gl.c @@ -31,6 +31,7 @@ typedef target_phys_addr_t arg_t; #include "opengl_process.h" #include "opengl_exec.h" +#include "helper_opengl.h" #include #include "tizen/src/debug_ch.h" -- 2.34.1