From 5ac98afeec57191da18004e4a7c466502460ce4a Mon Sep 17 00:00:00 2001 From: Marek Bel Date: Thu, 2 Aug 2018 14:55:38 +0200 Subject: [PATCH] Fix compiler warning sketch/optiboot_w25x20cl.cpp: In function 'void optiboot_w25x20cl_enter()': sketch/optiboot_w25x20cl.cpp:275:15: warning: variable 'desttype' set but not used [-Wunused-but-set-variable] --- Firmware/optiboot_w25x20cl.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Firmware/optiboot_w25x20cl.cpp b/Firmware/optiboot_w25x20cl.cpp index cc6c66cd..d05ae59f 100644 --- a/Firmware/optiboot_w25x20cl.cpp +++ b/Firmware/optiboot_w25x20cl.cpp @@ -272,7 +272,6 @@ void optiboot_w25x20cl_enter() /* Read memory block mode, length is big endian. */ else if(ch == STK_READ_PAGE) { uint32_t addr = (((uint32_t)rampz) << 16) | address; - uint8_t desttype; register pagelen_t i; // Read the page length, with the length transferred each nibble separately to work around // the Prusa's USB to serial infamous semicolon issue. @@ -280,8 +279,8 @@ void optiboot_w25x20cl_enter() length |= ((pagelen_t)getch()) << 8; length |= getch(); length |= getch(); - // Read the destination type. It should always be 'F' as flash. - desttype = getch(); + // Read the destination type. It should always be 'F' as flash. It is not checked. + (void)getch(); verifySpace(); w25x20cl_wait_busy(); w25x20cl_rd_data(addr, buff, length);