Mesa (master): i965g: Fix 'control reaches end of non-void function' warning.

Vinson Lee vlee at kemper.freedesktop.org
Tue Sep 14 00:09:36 PDT 2010


Module: Mesa
Branch: master
Commit: 45ee8463a2a771c68b8146c87fa582a004dfde5e
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=45ee8463a2a771c68b8146c87fa582a004dfde5e

Author: Vinson Lee <vlee at vmware.com>
Date:   Tue Sep 14 00:08:45 2010 -0700

i965g: Fix 'control reaches end of non-void function' warning.

Fixes the following GCC warning.
brw_screen.c: In function 'brw_get_shader_param':
brw_screen.c:241: warning: control reaches end of non-void function

---

 src/gallium/drivers/i965/brw_screen.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/src/gallium/drivers/i965/brw_screen.c b/src/gallium/drivers/i965/brw_screen.c
index 2359980..864b21f 100644
--- a/src/gallium/drivers/i965/brw_screen.c
+++ b/src/gallium/drivers/i965/brw_screen.c
@@ -236,7 +236,8 @@ brw_get_shader_param(struct pipe_screen *screen, unsigned shader, enum pipe_shad
       case PIPE_SHADER_CAP_TGSI_CONT_SUPPORTED:
          return 1;
       default:
-              break;
+         assert(0);
+         return 0;
       }
 }
 



More information about the mesa-commit mailing list