[Mesa-dev] [PATCH v2] swr: fix clang warnings

Cherniak, Bruce bruce.cherniak at intel.com
Fri Apr 22 22:45:43 UTC 2016


Reviewed-by: Bruce Cherniak <bruce.cherniak at intel.com<mailto:bruce.cherniak at intel.com>>

On Apr 21, 2016, at 11:50 AM, Tim Rowley <timothy.o.rowley at intel.com<mailto:timothy.o.rowley at intel.com>> wrote:

v2: use alternate logic version in swr_check_render_cond
---
src/gallium/drivers/swr/swr_query.cpp | 2 +-
src/gallium/drivers/swr/swr_shader.h  | 8 ++++----
2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/gallium/drivers/swr/swr_query.cpp b/src/gallium/drivers/swr/swr_query.cpp
index e4b8b68..76708ba 100644
--- a/src/gallium/drivers/swr/swr_query.cpp
+++ b/src/gallium/drivers/swr/swr_query.cpp
@@ -314,7 +314,7 @@ swr_check_render_cond(struct pipe_context *pipe)
   b = pipe->get_query_result(
      pipe, ctx->render_cond_query, wait, (union pipe_query_result *)&result);
   if (b)
-      return (!result == ctx->render_cond_cond);
+      return ((!result) == ctx->render_cond_cond);
   else
      return TRUE;
}
diff --git a/src/gallium/drivers/swr/swr_shader.h b/src/gallium/drivers/swr/swr_shader.h
index 3f79570..11d50c3 100644
--- a/src/gallium/drivers/swr/swr_shader.h
+++ b/src/gallium/drivers/swr/swr_shader.h
@@ -23,10 +23,10 @@

#pragma once

-class swr_vertex_shader;
-class swr_fragment_shader;
-class swr_jit_fs_key;
-class swr_jit_vs_key;
+struct swr_vertex_shader;
+struct swr_fragment_shader;
+struct swr_jit_fs_key;
+struct swr_jit_vs_key;

PFN_VERTEX_FUNC
swr_compile_vs(struct swr_context *ctx, swr_jit_vs_key &key);
--
1.9.1

_______________________________________________
mesa-dev mailing list
mesa-dev at lists.freedesktop.org<mailto:mesa-dev at lists.freedesktop.org>
https://lists.freedesktop.org/mailman/listinfo/mesa-dev



More information about the mesa-dev mailing list