/* -*- tab-width: 4; -*- */1/* vi: set sw=2 ts=4 expandtab: */23/* Copyright 2019-2018 The Khronos Group Inc.4* SPDX-License-Identifier: Apache-2.05*/67/* I'm extending this beyond the purpose implied by its name rather than creating8* a new file to hold the FALLTHROUGH declaration as this9* file is already included in most places FALLTHROUGH10* is needed.11*/1213#ifndef _UNUSED_H14#define _UNUSED_H1516#if (__cplusplus >= 201703L)17#define MAYBE_UNUSED [[maybe_unused]]18#elif __GNUC__ || __clang__19#define MAYBE_UNUSED __attribute__((unused))20#else21// Boohoo. VC++ has no equivalent22#define MAYBE_UNUSED23#endif2425#define U_ASSERT_ONLY MAYBE_UNUSED2627// For unused parameters of c functions. Portable.28#define UNUSED(x) (void)(x)2930#if !__clang__ && __GNUC__ // grumble ... clang ... grumble31#define FALLTHROUGH __attribute__((fallthrough))32#else33#define FALLTHROUGH34#endif3536#endif /* UNUSED_H */373839