Skip to content

Commit

Permalink
audio/spectmorph: Remove 'register' keywords instead of having USE_ST…
Browse files Browse the repository at this point in the history
…DCXX=c++17

Reported by:	fallout
  • Loading branch information
yurivict committed Jul 12, 2023
1 parent 1e4eb1f commit 0905270
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 1 deletion.
1 change: 0 additions & 1 deletion audio/spectmorph/Makefile
Expand Up @@ -25,7 +25,6 @@ USE_GNOME= cairo glib20
USE_GL= gl
USE_XORG= x11
USE_LDCONFIG= yes
USE_CXXSTD= c++14 # fix compilation failure on 14: error: ISO C++17 does not allow 'register' storage class specifier [-Wregister]

SHEBANG_FILES= tools/sminstbuilder.in

Expand Down
23 changes: 23 additions & 0 deletions audio/spectmorph/files/patch-lib_smmath.hh
@@ -0,0 +1,23 @@
- fix compilation failure on 14: error: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
- see https://github.com/swesterfeld/spectmorph/issues/23

--- lib/smmath.hh.orig 2023-07-12 03:47:47 UTC
+++ lib/smmath.hh
@@ -431,7 +431,7 @@ double db_from_factor (double factor, double min_dB);

#if defined (__i386__) && defined (__GNUC__)
static inline int G_GNUC_CONST
-sm_ftoi (register float f)
+sm_ftoi (float f)
{
int r;

@@ -441,7 +441,7 @@ sm_ftoi (register float f)
return r;
}
static inline int G_GNUC_CONST
-sm_dtoi (register double f)
+sm_dtoi (double f)
{
int r;

0 comments on commit 0905270

Please sign in to comment.