Skip to content

Commit 1fa87da

Browse files
committed
Fix gnu++17 register warning
1 parent e63af1a commit 1fa87da

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

Firmware/optiboot_xflash.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,8 @@ uint8_t optiboot_xflash_enter()
8888
if ((boot_app_magic == BOOT_APP_MAGIC) && (boot_app_flags & BOOT_APP_FLG_USER0)) return 1;
8989
uint8_t ch;
9090
uint8_t rampz = 0;
91-
register uint16_t address = 0;
92-
register pagelen_t length;
91+
uint16_t address = 0;
92+
pagelen_t length;
9393
// Use the planner's queue for the receive / transmit buffers.
9494
// uint8_t *buff = (uint8_t*)block_buffer;
9595
uint8_t buff[260];
@@ -271,7 +271,7 @@ uint8_t optiboot_xflash_enter()
271271
/* Read memory block mode, length is big endian. */
272272
else if(ch == STK_READ_PAGE) {
273273
uint32_t addr = (((uint32_t)rampz) << 16) | address;
274-
register pagelen_t i;
274+
pagelen_t i;
275275
// Read the page length, with the length transferred each nibble separately to work around
276276
// the Prusa's USB to serial infamous semicolon issue.
277277
length = ((pagelen_t)getch()) << 8;

Firmware/tmc2130.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -977,7 +977,7 @@ void bubblesort_uint8(uint8_t* data, uint8_t size, uint8_t* data2)
977977
for (uint8_t i = 0; i < (size - 1); i++)
978978
if (data[i] > data[i+1])
979979
{
980-
uint8_t register d = data[i];
980+
uint8_t d = data[i];
981981
data[i] = data[i+1];
982982
data[i+1] = d;
983983
if (data2)

0 commit comments

Comments
 (0)