mfbt/unused.h
author Ralph Giles <giles@mozilla.com>
Fri, 06 Feb 2015 10:26:00 -0800
changeset 228809 07479758ab6870988d3165990e8d4b468628aeba
parent 204249 dc971e50ebf08dcf64a23a5841b04f9f383d8579
child 252629 91d6e262b662a0b4e47358665e222d3927337af9
permissions -rw-r--r--
Bug 794723 - Add a default makefile which wraps mach. r=gps This makes it easier for new contributors to get a build started without having to know about our mach driver.

/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
/* This Source Code Form is subject to the terms of the Mozilla Public
 * 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/. */

#ifndef mozilla_unused_h
#define mozilla_unused_h

#include "mozilla/Types.h"

namespace mozilla {

//
// Suppress GCC warnings about unused return values with
//   unused << SomeFuncDeclaredWarnUnusedReturnValue();
//
struct unused_t
{
};

extern MFBT_DATA const unused_t unused;

template<typename T>
inline void
operator<<(const unused_t& /*unused*/, const T& /*unused*/)
{
}

}

#endif // mozilla_unused_h