From e7b8d546a4ba3f112508acd208b2d40785aacbec Mon Sep 17 00:00:00 2001 From: Patryk Obara Date: Sun, 2 Feb 2020 02:47:29 +0100 Subject: [PATCH] Remove usage of register storage specifier This keywords is only a hint, was used in C in 1970s, but is useless nowadays. Some reports indicate, that GCC never used it to actually treat variable as a register. It was deprecated from C++ in 2009: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n4193.html#809 It was removed from language in C++17, and will likely see new meaning in some future standard, similar to how 'auto' got replaced in C++11. --- src/cpu/core_dyn_x86/risc_x86.h | 4 ++-- src/gui/render_templates_sai.h | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/cpu/core_dyn_x86/risc_x86.h b/src/cpu/core_dyn_x86/risc_x86.h index a59b1644..c49060ef 100644 --- a/src/cpu/core_dyn_x86/risc_x86.h +++ b/src/cpu/core_dyn_x86/risc_x86.h @@ -112,7 +112,7 @@ return_address: mov [retval],eax } #elif defined (MACOSX) - register Bit32u tempflags=reg_flags & FMASK_TEST; + Bit32u tempflags = reg_flags & FMASK_TEST; __asm__ volatile ( "pushl %%ebx \n" "pushl %%ebp \n" @@ -128,7 +128,7 @@ return_address: ); reg_flags=(reg_flags & ~FMASK_TEST) | (tempflags & FMASK_TEST); #else - register Bit32u tempflags=reg_flags & FMASK_TEST; + Bit32u tempflags = reg_flags & FMASK_TEST; __asm__ volatile ( "pushl %%ebp \n" "pushl $(run_return_adress) \n" diff --git a/src/gui/render_templates_sai.h b/src/gui/render_templates_sai.h index 95103367..287d9aed 100644 --- a/src/gui/render_templates_sai.h +++ b/src/gui/render_templates_sai.h @@ -43,7 +43,7 @@ inline void conc2d(Super2xSaI,SBPP)(PTYPE * line0, PTYPE * line1, const PTYPE * } else if (C4 == C8 && C7 != C5) { line1[1] = line0[1] = C4; } else if (C4 == C8 && C7 == C5) { - register int r = 0; + int r = 0; r += conc2d(GetResult,SBPP)(C5,C4,C6,D1); r += conc2d(GetResult,SBPP)(C5,C4,C3,C1); r += conc2d(GetResult,SBPP)(C5,C4,D2,D5); @@ -127,7 +127,7 @@ inline void conc2d(SuperEagle,SBPP)(PTYPE * line0, PTYPE * line1, const PTYPE * line1[0] = interp_w2(C7,C8,1U,1U); } } else { - register int r = 0; + int r = 0; r += conc2d(GetResult,SBPP)(C5,C4,C6,D1); r += conc2d(GetResult,SBPP)(C5,C4,C3,C1); r += conc2d(GetResult,SBPP)(C5,C4,D2,D5); @@ -185,7 +185,7 @@ inline void conc2d(_2xSaI,SBPP)(PTYPE * line0, PTYPE * line1, const PTYPE * fc) line1[0] = C4; line1[1] = C4; } else { - register int r = 0; + int r = 0; r += conc2d(GetResult,SBPP)(C4,C5,C3,C1); r -= conc2d(GetResult,SBPP)(C5,C4,D4,C2); r -= conc2d(GetResult,SBPP)(C5,C4,C6,D1);