michael@0: /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- michael@0: * vim: sw=2 ts=8 et : michael@0: */ michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: #ifndef mozilla_unused_h michael@0: #define mozilla_unused_h michael@0: michael@0: #include "nscore.h" michael@0: michael@0: namespace mozilla { michael@0: michael@0: // michael@0: // Suppress GCC warnings about unused return values with michael@0: // unused << SomeFuncDeclaredWarnUnusedReturnValue(); michael@0: // michael@0: struct NS_COM_GLUE unused_t { }; michael@0: michael@0: extern const unused_t NS_COM_GLUE unused; michael@0: michael@0: template michael@0: inline void operator<<(const unused_t& /*unused*/, const T& /*unused*/) { } michael@0: michael@0: } michael@0: michael@0: #endif // mozilla_unused_h