ddebug: fix a few MSVC compiler warnings
authorBrian Paul <brianp@vmware.com>
Sat, 4 May 2019 16:01:31 +0000 (10:01 -0600)
committerBrian Paul <brianp@vmware.com>
Wed, 8 May 2019 16:05:41 +0000 (10:05 -0600)
Don't return an expression in void functions.
Replace an unsigned int with proper enum.

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
src/gallium/auxiliary/driver_ddebug/dd_context.c
src/gallium/auxiliary/driver_ddebug/dd_screen.c

index 8a3b75a2436399eafd3c31859ce2663d067c7d40..001a69fa6c8552712fbb92007d9e1ae487b4eb42 100644 (file)
@@ -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
index ce9f697ad08a115f3f8126dcdf39948ffc956b32..f3bd07985110ead2f46eba90467f688b69c74f7d 100644 (file)
@@ -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 *