From: Timo Kokkonen Date: Fri, 24 Dec 2010 20:23:23 +0000 (+0200) Subject: quadtree: Fix compiler warnings X-Git-Url: http://git.itanic.dy.fi/?p=sdl-planets;a=commitdiff_plain;h=34eafa499e8f98e589bb1534ea6f24d23cd56846 quadtree: Fix compiler warnings quadtree.c:370: warning: unused variable ‘ret’ Trivial remove quadtree.c: In function ‘quadtree_find_nearest’: quadtree.c:369: warning: ‘distance’ may be used uninitialized in this function This variable will not be used uninitialized, but the compiler warning is trivial to fix with simply initializing the variable with zero. Signed-off-by: Timo Kokkonen --- diff --git a/quadtree.c b/quadtree.c index 5e57afd..9cc6821 100644 --- a/quadtree.c +++ b/quadtree.c @@ -366,8 +366,8 @@ static struct quadtree *quadtree_find_nearest(struct quadtree *tree, { struct vector tmp; struct quadtree *nearest, *node; - double distance, dist; - int ret, i, directions; + double distance = 0, dist; + int i, directions; if (!is_within(pos, corner)) { if (debug) {