Unverified Commit e87b505f authored by Emily's avatar Emily Committed by GitHub
Browse files

maelstrom: remove register keyword; fix clang (#351835)

parents bcd144a1 f1644ee9
Loading
Loading
Loading
Loading
+32 −0
Original line number Diff line number Diff line
diff --git a/fastrand.cpp b/fastrand.cpp
index 3714f02..d1cf224 100644
--- a/fastrand.cpp
+++ b/fastrand.cpp
@@ -30,10 +30,10 @@ Uint32 GetRandSeed(void)
 Uint16 FastRandom(Uint16 range)
 {
 	Uint16 result;
-	register Uint32 calc;
-	register Uint32 regD0;
-	register Uint32 regD1;
-	register Uint32 regD2;
+	Uint32 calc;
+	Uint32 regD0;
+	Uint32 regD1;
+	Uint32 regD2;
 
 #ifdef SERIOUS_DEBUG
   fprintf(stderr, "FastRandom(%hd)  Seed in: %lu ", range, randomSeed);
diff --git a/screenlib/SDL_FrameBuf.cpp b/screenlib/SDL_FrameBuf.cpp
index 2f7b44c..c8e394b 100644
--- a/screenlib/SDL_FrameBuf.cpp
+++ b/screenlib/SDL_FrameBuf.cpp
@@ -555,7 +555,7 @@ static inline void memswap(Uint8 *dst, Uint8 *src, Uint8 len)
 	}
 #else
 	/* Swap two buffers using a temporary variable */
-	register Uint8 tmp;
+	Uint8 tmp;
 
 	while ( len-- ) {
 		tmp = *dst;
+6 −2
Original line number Diff line number Diff line
@@ -9,8 +9,12 @@ stdenv.mkDerivation rec {
    sha256 = "0dm0m5wd7amrsa8wnrblkv34sq4v4lglc2wfx8klfkdhyhi06s4k";
  };

  patches = [
    # this fixes a typedef compilation error with gcc-3.x
  patches = [ ./fix-compilation.patch ];
    ./fix-compilation.patch
    # removes register keyword
    ./c++17-fixes.diff
  ];

  buildInputs = [ SDL2 SDL2_net ];