summaryrefslogtreecommitdiffstatshomepage
path: root/src/osd
diff options
context:
space:
mode:
author Olivier Galibert <galibert@pobox.com>2021-01-22 12:50:24 +0100
committer Olivier Galibert <galibert@pobox.com>2021-01-22 13:23:58 +0100
commitaa33ec12734d0789e54ee3ba0024295706af46f0 (patch)
tree34f74bcdd5b31f4b53c0ecb57b831c3802b65e29 /src/osd
parent39b4a9817390ded473d0b7026e892225b6f02af9 (diff)
ATTR_UNUSED, do you welcome C++17 in your heart and mind?
Diffstat (limited to 'src/osd')
-rw-r--r--src/osd/mac/window.h2
-rw-r--r--src/osd/modules/render/blit13.h4
-rw-r--r--src/osd/osdcomm.h2
-rw-r--r--src/osd/sdl/window.h2
4 files changed, 4 insertions, 6 deletions
diff --git a/src/osd/mac/window.h b/src/osd/mac/window.h
index 9ae9d1171f5..b6edd3bf223 100644
--- a/src/osd/mac/window.h
+++ b/src/osd/mac/window.h
@@ -28,7 +28,7 @@ class render_target;
typedef uintptr_t HashT;
-#define OSDWORK_CALLBACK(name) void *name(void *param, ATTR_UNUSED int threadid)
+#define OSDWORK_CALLBACK(name) void *name(void *param, [[maybe_unused]] int threadid)
class mac_window_info : public osd_window_t<void *>
{
diff --git a/src/osd/modules/render/blit13.h b/src/osd/modules/render/blit13.h
index f3dcea9bf0d..5c9feb64ec2 100644
--- a/src/osd/modules/render/blit13.h
+++ b/src/osd/modules/render/blit13.h
@@ -137,7 +137,7 @@ struct blit_texcopy : public blit_base
blit_texcopy() : blit_base(sizeof(_dest_type) / _len_div, false, false) { }
void texop(const texture_info *texture, const render_texinfo *texsource) const override
{
- ATTR_UNUSED const rgb_t *palbase = texsource->palette;
+ [[maybe_unused]] const rgb_t *palbase = texsource->palette;
int x, y;
/* loop over Y */
for (y = 0; y < texsource->height; y++) {
@@ -164,7 +164,7 @@ struct blit_texrot : public blit_base
blit_texrot() : blit_base(sizeof(_dest_type), true, false) { }
void texop(const texture_info *texture, const render_texinfo *texsource) const override
{
- ATTR_UNUSED const rgb_t *palbase = texsource->palette;
+ [[maybe_unused]] const rgb_t *palbase = texsource->palette;
int x, y;
const quad_setup_data *setup = &texture->m_setup;
int dudx = setup->dudx;
diff --git a/src/osd/osdcomm.h b/src/osd/osdcomm.h
index dfb9ab8ecde..679ffa4c777 100644
--- a/src/osd/osdcomm.h
+++ b/src/osd/osdcomm.h
@@ -33,7 +33,6 @@
/* Some optimizations/warnings cleanups for GCC */
#if defined(__GNUC__)
-#define ATTR_UNUSED __attribute__((__unused__))
#define ATTR_PRINTF(x,y) __attribute__((format(printf, x, y)))
#define ATTR_CONST __attribute__((const))
#define ATTR_FORCE_INLINE __attribute__((always_inline))
@@ -43,7 +42,6 @@
#define EXPECTED(exp) __builtin_expect(!!(exp), 1)
#define RESTRICT __restrict__
#else
-#define ATTR_UNUSED
#define ATTR_PRINTF(x,y)
#define ATTR_CONST
#define ATTR_FORCE_INLINE __forceinline
diff --git a/src/osd/sdl/window.h b/src/osd/sdl/window.h
index f5d5715b2f4..b2a6c6cf165 100644
--- a/src/osd/sdl/window.h
+++ b/src/osd/sdl/window.h
@@ -33,7 +33,7 @@ class SDL_DM_Wrapper;
typedef uintptr_t HashT;
-#define OSDWORK_CALLBACK(name) void *name(void *param, ATTR_UNUSED int threadid)
+#define OSDWORK_CALLBACK(name) void *name(void *param, [[maybe_unused]] int threadid)
class sdl_window_info : public osd_window_t<SDL_Window*>
{