[Mesa-dev] [PATCH 2/5] ddebug: fix a few MSVC compiler warnings
Brian Paul
brianp at vmware.com
Sat May 4 16:07:36 UTC 2019
Don't return an expression in void functions.
Replace an unsigned int with proper enum.
---
src/gallium/auxiliary/driver_ddebug/dd_context.c | 15 ++++++++-------
src/gallium/auxiliary/driver_ddebug/dd_screen.c | 2 +-
2 files changed, 9 insertions(+), 8 deletions(-)
diff --git a/src/gallium/auxiliary/driver_ddebug/dd_context.c b/src/gallium/auxiliary/driver_ddebug/dd_context.c
index 8a3b75a..001a69f 100644
--- a/src/gallium/auxiliary/driver_ddebug/dd_context.c
+++ b/src/gallium/auxiliary/driver_ddebug/dd_context.c
@@ -534,7 +534,8 @@ dd_context_set_shader_images(struct pipe_context *_pipe,
}
static void
-dd_context_set_shader_buffers(struct pipe_context *_pipe, unsigned shader,
+dd_context_set_shader_buffers(struct pipe_context *_pipe,
+ enum pipe_shader_type shader,
unsigned start, unsigned num_buffers,
const struct pipe_shader_buffer *buffers,
unsigned writable_bitmask)
@@ -680,7 +681,7 @@ dd_context_set_compute_resources(struct pipe_context *_pipe,
struct pipe_surface **resources)
{
struct pipe_context *pipe = dd_context(_pipe)->pipe;
- return pipe->set_compute_resources(pipe, start, count, resources);
+ pipe->set_compute_resources(pipe, start, count, resources);
}
static void
@@ -690,7 +691,7 @@ dd_context_set_global_binding(struct pipe_context *_pipe,
uint32_t **handles)
{
struct pipe_context *pipe = dd_context(_pipe)->pipe;
- return pipe->set_global_binding(pipe, first, count, resources, handles);
+ pipe->set_global_binding(pipe, first, count, resources, handles);
}
static void
@@ -700,8 +701,8 @@ dd_context_get_sample_position(struct pipe_context *_pipe,
{
struct pipe_context *pipe = dd_context(_pipe)->pipe;
- return pipe->get_sample_position(pipe, sample_count, sample_index,
- out_value);
+ pipe->get_sample_position(pipe, sample_count, sample_index,
+ out_value);
}
static void
@@ -727,7 +728,7 @@ dd_context_set_device_reset_callback(struct pipe_context *_pipe,
{
struct pipe_context *pipe = dd_context(_pipe)->pipe;
- return pipe->set_device_reset_callback(pipe, cb);
+ pipe->set_device_reset_callback(pipe, cb);
}
static void
@@ -747,7 +748,7 @@ dd_context_dump_debug_state(struct pipe_context *_pipe, FILE *stream,
{
struct pipe_context *pipe = dd_context(_pipe)->pipe;
- return pipe->dump_debug_state(pipe, stream, flags);
+ pipe->dump_debug_state(pipe, stream, flags);
}
static uint64_t
diff --git a/src/gallium/auxiliary/driver_ddebug/dd_screen.c b/src/gallium/auxiliary/driver_ddebug/dd_screen.c
index ce9f697..f3bd079 100644
--- a/src/gallium/auxiliary/driver_ddebug/dd_screen.c
+++ b/src/gallium/auxiliary/driver_ddebug/dd_screen.c
@@ -126,7 +126,7 @@ static void dd_screen_query_memory_info(struct pipe_screen *_screen,
{
struct pipe_screen *screen = dd_screen(_screen)->screen;
- return screen->query_memory_info(screen, info);
+ screen->query_memory_info(screen, info);
}
static struct pipe_context *
--
1.8.5.6
More information about the mesa-dev
mailing list