cast: suppress more warnings for 'ffs'

This commit is contained in:
Danny Robson 2018-08-20 15:08:15 +10:00
parent 55c5bf96c5
commit eb4a3be352

View File

@ -3,13 +3,13 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* Copyright 2011 Danny Robson <danny@nerdcruft.net>
* Copyright 2011-2018 Danny Robson <danny@nerdcruft.net>
*/
#ifndef __UTIL_CAST_HPP
#define __UTIL_CAST_HPP
#pragma once
#include "debug.hpp"
#include "platform.hpp"
#include <type_traits>
#include <limits>
@ -172,9 +172,10 @@ namespace cruft::cast {
{
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wcast-align"
#if defined(COMPILER_GCC)
#pragma GCC diagnostic ignored "-Wcast-function-type"
#endif
return reinterpret_cast<DstT> (src);
#pragma GCC diagnostic pop
}
}
#endif