From eea26eb0c876c8ef0e91c3f96a175261a8017778 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Mon, 27 Jul 2020 11:04:34 +0200 Subject: Fix some unused variable warnings. --- src/locale_convert.h | 5 ++++- src/raw_convert.h | 5 ++++- src/util.h | 2 ++ 3 files changed, 10 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/locale_convert.h b/src/locale_convert.h index aaf0dd6e..ab1984e4 100644 --- a/src/locale_convert.h +++ b/src/locale_convert.h @@ -34,6 +34,7 @@ #ifndef LIBDCP_LOCALE_CONVERT_H #define LIBDCP_LOCALE_CONVERT_H +#include "util.h" #include #include #include @@ -43,12 +44,14 @@ namespace dcp { template P -locale_convert (Q x, int precision = 16, bool fixed = false) +locale_convert (Q, int precision = 16, bool fixed = false) { /* We can't write a generic version of locale_convert; all required versions must be specialised. */ BOOST_STATIC_ASSERT (sizeof (Q) == 0); + LIBDCP_UNUSED(precision); + LIBDCP_UNUSED(fixed); } template <> diff --git a/src/raw_convert.h b/src/raw_convert.h index fb3c7954..2a0d7add 100644 --- a/src/raw_convert.h +++ b/src/raw_convert.h @@ -34,6 +34,7 @@ #ifndef LIBDCP_RAW_CONVERT_H #define LIBDCP_RAW_CONVERT_H +#include "util.h" #include #include @@ -44,12 +45,14 @@ namespace dcp { */ template P -raw_convert (Q v, int precision = 16, bool fixed = false) +raw_convert (Q, int precision = 16, bool fixed = false) { /* We can't write a generic version of raw_convert; all required versions must be specialised. */ BOOST_STATIC_ASSERT (sizeof (Q) == 0); + LIBDCP_UNUSED(precision); + LIBDCP_UNUSED(fixed); } template <> diff --git a/src/util.h b/src/util.h index 85b58286..b6683265 100644 --- a/src/util.h +++ b/src/util.h @@ -48,6 +48,8 @@ #include #include +#define LIBDCP_UNUSED(x) (void)(x) + namespace xmlpp { class Element; class Node; -- cgit v1.2.3