]> git.sur5r.net Git - openocd/commitdiff
warning: fix silly -O3 warning
authorØyvind Harboe <oyvind.harboe@zylin.com>
Tue, 7 Sep 2010 16:38:06 +0000 (18:38 +0200)
committerØyvind Harboe <oyvind.harboe@zylin.com>
Tue, 7 Sep 2010 16:39:04 +0000 (18:39 +0200)
Some versions of GCC don't pick up that local variables
are set in all code paths.

Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
src/jtag/core.c

index 6f9d92a53d1b1ec6fe69601f0ecd278add1a74a1..dd3a2a61646c0037567947e121f0d95b6f576452 100644 (file)
@@ -1634,7 +1634,7 @@ int jtag_config_rclk(unsigned fallback_speed_khz)
 
 int jtag_get_speed(void)
 {
-       int speed;
+       int speed = 0; /* avoid -O3 warning */
        switch(clock_mode)
        {
                case CLOCK_MODE_SPEED: