Merge pull request #3528 from leptun/fix_some_gcc7.3.0_warnings
Fix gnu++17 register warning
This commit is contained in:
commit
7c108c9420
@ -88,8 +88,8 @@ uint8_t optiboot_xflash_enter()
|
|||||||
if ((boot_app_magic == BOOT_APP_MAGIC) && (boot_app_flags & BOOT_APP_FLG_USER0)) return 1;
|
if ((boot_app_magic == BOOT_APP_MAGIC) && (boot_app_flags & BOOT_APP_FLG_USER0)) return 1;
|
||||||
uint8_t ch;
|
uint8_t ch;
|
||||||
uint8_t rampz = 0;
|
uint8_t rampz = 0;
|
||||||
register uint16_t address = 0;
|
uint16_t address = 0;
|
||||||
register pagelen_t length;
|
pagelen_t length;
|
||||||
// Use the planner's queue for the receive / transmit buffers.
|
// Use the planner's queue for the receive / transmit buffers.
|
||||||
// uint8_t *buff = (uint8_t*)block_buffer;
|
// uint8_t *buff = (uint8_t*)block_buffer;
|
||||||
uint8_t buff[260];
|
uint8_t buff[260];
|
||||||
@ -271,7 +271,7 @@ uint8_t optiboot_xflash_enter()
|
|||||||
/* Read memory block mode, length is big endian. */
|
/* Read memory block mode, length is big endian. */
|
||||||
else if(ch == STK_READ_PAGE) {
|
else if(ch == STK_READ_PAGE) {
|
||||||
uint32_t addr = (((uint32_t)rampz) << 16) | address;
|
uint32_t addr = (((uint32_t)rampz) << 16) | address;
|
||||||
register pagelen_t i;
|
pagelen_t i;
|
||||||
// Read the page length, with the length transferred each nibble separately to work around
|
// Read the page length, with the length transferred each nibble separately to work around
|
||||||
// the Prusa's USB to serial infamous semicolon issue.
|
// the Prusa's USB to serial infamous semicolon issue.
|
||||||
length = ((pagelen_t)getch()) << 8;
|
length = ((pagelen_t)getch()) << 8;
|
||||||
|
@ -977,7 +977,7 @@ void bubblesort_uint8(uint8_t* data, uint8_t size, uint8_t* data2)
|
|||||||
for (uint8_t i = 0; i < (size - 1); i++)
|
for (uint8_t i = 0; i < (size - 1); i++)
|
||||||
if (data[i] > data[i+1])
|
if (data[i] > data[i+1])
|
||||||
{
|
{
|
||||||
uint8_t register d = data[i];
|
uint8_t d = data[i];
|
||||||
data[i] = data[i+1];
|
data[i] = data[i+1];
|
||||||
data[i+1] = d;
|
data[i+1] = d;
|
||||||
if (data2)
|
if (data2)
|
||||||
|
Loading…
Reference in New Issue
Block a user