From 8e6c3f7bf8d8cf75583abd2e5a019f1868916c19 Mon Sep 17 00:00:00 2001 From: Sander van Dijk Date: Thu, 19 Jan 2012 20:44:26 +0100 Subject: [PATCH] Make gl_rsurf.c compile without warnings with "gcc (GCC) 4.4.5 20101112 (Red Hat 4.4.5-2)". --- libs/video/renderer/gl/gl_rsurf.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/libs/video/renderer/gl/gl_rsurf.c b/libs/video/renderer/gl/gl_rsurf.c index 103a97b76..b7e0fceae 100644 --- a/libs/video/renderer/gl/gl_rsurf.c +++ b/libs/video/renderer/gl/gl_rsurf.c @@ -68,7 +68,8 @@ instsurf_t **sky_chain_tail; #define CHAIN_SURF_F2B(surf,chain) \ do { \ instsurf_t *inst = (surf)->instsurf; \ - if (!inst) (surf)->tinst = inst = get_instsurf (); \ + if (__builtin_expect(!inst, 1)) \ + (surf)->tinst = inst = get_instsurf (); \ inst->surface = (surf); \ *(chain##_tail) = inst; \ (chain##_tail) = &inst->tex_chain; \ @@ -78,7 +79,8 @@ instsurf_t **sky_chain_tail; #define CHAIN_SURF_B2F(surf,chain) \ do { \ instsurf_t *inst = (surf)->instsurf; \ - if (!inst) (surf)->tinst = inst = get_instsurf (); \ + if (__builtin_expect(!inst, 1)) \ + (surf)->tinst = inst = get_instsurf (); \ inst->surface = (surf); \ inst->tex_chain = (chain); \ (chain) = inst; \ @@ -387,7 +389,7 @@ R_DrawWaterSurfaces (void) } } -static inline void +static void DrawTextureChains (int disable_blend, int do_bind) { int i;