From: Tormod Volden Date: Sat, 21 May 2016 21:36:52 +0000 (+0200) Subject: dragon-nx32: Avoid variable shadowing in devfd.c X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=28fe2fb8d8e02e5f7e1adcbf7d305bebbbc583d9;p=FUZIX.git dragon-nx32: Avoid variable shadowing in devfd.c If we jump to "bad" we can report the error code and not an undefined value (which gives gcc warning). Signed-off-by: Tormod Volden --- diff --git a/Kernel/platform-dragon-nx32/devfd.c b/Kernel/platform-dragon-nx32/devfd.c index c335e4bf..c1c5417d 100644 --- a/Kernel/platform-dragon-nx32/devfd.c +++ b/Kernel/platform-dragon-nx32/devfd.c @@ -64,7 +64,7 @@ static int fd_transfer(uint8_t minor, bool is_read, uint8_t rawflag) fd_motor_busy(); /* Touch the motor timer first so we don't go and turn it off as we are doing this */ if (fd_selected != minor) { - uint8_t err = fd_motor_on(selmap[minor]); + err = fd_motor_on(selmap[minor]); if (err) goto bad; }