Bug 1428535 - Revert some unnecessary -Wsuggest-override warning suppressions.

It was decided in bug 1430669 that we won't enable gcc's -Wsuggest-override warnings at this time, so these ugly pragmas from bug 1428535 won't be necessary.

--HG--
extra : rebase_source : 221b1f40bb071933ad3e320ce2fa491b2a5917fb
extra : amend_source : 7fc3e6ff067aa5ae8d728e1751de3d2590d31493
This commit is contained in:
Chris Peterson 2018-01-17 11:39:34 -08:00
Родитель 69aab9d558
Коммит 944d82e014
2 изменённых файлов: 1 добавлений и 33 удалений

Просмотреть файл

@ -20,24 +20,10 @@
#include "threading/ExclusiveData.h"
#if ENABLE_INTL_API
// Suppress warnings from ICU header files.
#if defined(__GNUC__) && !defined(__clang__)
# pragma GCC diagnostic push
# if MOZ_GCC_VERSION_AT_LEAST(5, 0, 0)
# pragma GCC diagnostic ignored "-Wsuggest-override"
# endif
#endif
#include "unicode/timezone.h"
#if defined(XP_WIN)
#include "unicode/unistr.h"
#endif
#if defined(__GNUC__) && !defined(__clang__)
# pragma GCC diagnostic pop // -Wsuggest-override
#endif
#endif /* ENABLE_INTL_API */
#include "vm/MutexIDs.h"

Просмотреть файл

@ -1185,7 +1185,7 @@ public:
static_assert(sizeof...(Storages) == sizeof...(Args), "Storages and Args should have equal sizes");
}
NS_IMETHOD Run() override
NS_IMETHOD Run()
{
CancelTimer();
@ -1196,20 +1196,6 @@ public:
return NS_OK;
}
// Some RunnableMethodImpl types specify templatized base classes that declare
// the following member functions as virtual and others don't declare them at
// all (so we can't add `override` here). Suppressing override warnings here is
// cleaner than adding unused no-op virtual member functions to all of
// RunnableMethodImpl's base classes.
#if defined(__GNUC__)
# pragma GCC diagnostic push
# if defined(__clang__)
# pragma GCC diagnostic ignored "-Winconsistent-missing-override"
# elif MOZ_GCC_VERSION_AT_LEAST(5, 0, 0)
# pragma GCC diagnostic ignored "-Wsuggest-override"
# endif
#endif
nsresult Cancel()
{
static_assert(Kind >= Cancelable, "Don't use me!");
@ -1244,10 +1230,6 @@ public:
"detail::RunnableMethodImpl::SetTimer");
}
}
#if defined(__GNUC__)
# pragma GCC diagnostic pop // override warnings
#endif
};
// Type aliases for NewRunnableMethod.