From 4dd11eefe4e1899894c3849d803dce27673fc186 Mon Sep 17 00:00:00 2001 From: Nicholas Nethercote Date: Thu, 15 Jan 2015 21:17:18 -0800 Subject: [PATCH] Bug 1122337 - Mark DMD directories as FAIL_ON_WARNINGS. r=glandium. The DEFINES and XPCOM_API changes are needed to get rid of "inconsistent dll linkage" warnings on Windows builds. --HG-- extra : rebase_source : 00756f51ebee85c70f65d51dbac17b4835262697 --- memory/replace/dmd/moz.build | 4 ++++ memory/replace/dmd/test/moz.build | 2 ++ xpcom/base/nsStackWalk.cpp | 18 +++++++++--------- 3 files changed, 15 insertions(+), 9 deletions(-) diff --git a/memory/replace/dmd/moz.build b/memory/replace/dmd/moz.build index f1b9e0a4ea7..3c08e77c3d6 100644 --- a/memory/replace/dmd/moz.build +++ b/memory/replace/dmd/moz.build @@ -4,6 +4,8 @@ # 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/. +FAIL_ON_WARNINGS = True + EXPORTS += [ 'DMD.h', ] @@ -22,6 +24,8 @@ SOURCES += [ SharedLibrary('dmd') DEFINES['MOZ_NO_MOZALLOC'] = True +DEFINES['IMPL_MFBT'] = True +DEFINES['XPCOM_GLUE'] = True if CONFIG['MOZ_OPTIMIZE']: DEFINES['MOZ_OPTIMIZE'] = True diff --git a/memory/replace/dmd/test/moz.build b/memory/replace/dmd/test/moz.build index 5ed99e132d8..697a9695bee 100644 --- a/memory/replace/dmd/test/moz.build +++ b/memory/replace/dmd/test/moz.build @@ -4,6 +4,8 @@ # 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/. +FAIL_ON_WARNINGS = True + GeckoSimplePrograms([ 'SmokeDMD', ], linkage=None) diff --git a/xpcom/base/nsStackWalk.cpp b/xpcom/base/nsStackWalk.cpp index cf3ef9470b6..936de821930 100644 --- a/xpcom/base/nsStackWalk.cpp +++ b/xpcom/base/nsStackWalk.cpp @@ -505,7 +505,7 @@ WalkStackThread(void* aData) * whose in memory address doesn't match its in-file address. */ -EXPORT_XPCOM_API(nsresult) +XPCOM_API(nsresult) NS_StackWalk(NS_WalkStackCallback aCallback, uint32_t aSkipFrames, uint32_t aMaxFrames, void* aClosure, uintptr_t aThread, void* aPlatformData) @@ -773,7 +773,7 @@ EnsureSymInitialized() } -EXPORT_XPCOM_API(nsresult) +XPCOM_API(nsresult) NS_DescribeCodeAddress(void* aPC, nsCodeAddressDetails* aDetails) { aDetails->library[0] = '\0'; @@ -939,7 +939,7 @@ FramePointerStackWalk(NS_WalkStackCallback aCallback, uint32_t aSkipFrames, #define X86_OR_PPC (defined(__i386) || defined(PPC) || defined(__ppc__)) #if X86_OR_PPC && (NSSTACKWALK_SUPPORTS_MACOSX || NSSTACKWALK_SUPPORTS_LINUX) // i386 or PPC Linux or Mac stackwalking code -EXPORT_XPCOM_API(nsresult) +XPCOM_API(nsresult) NS_StackWalk(NS_WalkStackCallback aCallback, uint32_t aSkipFrames, uint32_t aMaxFrames, void* aClosure, uintptr_t aThread, void* aPlatformData) @@ -1008,7 +1008,7 @@ unwind_callback(struct _Unwind_Context* context, void* closure) return _URC_NO_REASON; } -EXPORT_XPCOM_API(nsresult) +XPCOM_API(nsresult) NS_StackWalk(NS_WalkStackCallback aCallback, uint32_t aSkipFrames, uint32_t aMaxFrames, void* aClosure, uintptr_t aThread, void* aPlatformData) @@ -1042,7 +1042,7 @@ NS_StackWalk(NS_WalkStackCallback aCallback, uint32_t aSkipFrames, #endif -EXPORT_XPCOM_API(nsresult) +XPCOM_API(nsresult) NS_DescribeCodeAddress(void* aPC, nsCodeAddressDetails* aDetails) { aDetails->library[0] = '\0'; @@ -1079,7 +1079,7 @@ NS_DescribeCodeAddress(void* aPC, nsCodeAddressDetails* aDetails) #else // unsupported platform. -EXPORT_XPCOM_API(nsresult) +XPCOM_API(nsresult) NS_StackWalk(NS_WalkStackCallback aCallback, uint32_t aSkipFrames, uint32_t aMaxFrames, void* aClosure, uintptr_t aThread, void* aPlatformData) @@ -1098,7 +1098,7 @@ FramePointerStackWalk(NS_WalkStackCallback aCallback, uint32_t aSkipFrames, } } -EXPORT_XPCOM_API(nsresult) +XPCOM_API(nsresult) NS_DescribeCodeAddress(void* aPC, nsCodeAddressDetails* aDetails) { aDetails->library[0] = '\0'; @@ -1112,7 +1112,7 @@ NS_DescribeCodeAddress(void* aPC, nsCodeAddressDetails* aDetails) #endif -EXPORT_XPCOM_API(void) +XPCOM_API(void) NS_FormatCodeAddressDetails(char* aBuffer, uint32_t aBufferSize, uint32_t aFrameNumber, void* aPC, const nsCodeAddressDetails* aDetails) @@ -1123,7 +1123,7 @@ NS_FormatCodeAddressDetails(char* aBuffer, uint32_t aBufferSize, aDetails->filename, aDetails->lineno); } -EXPORT_XPCOM_API(void) +XPCOM_API(void) NS_FormatCodeAddress(char* aBuffer, uint32_t aBufferSize, uint32_t aFrameNumber, const void* aPC, const char* aFunction, const char* aLibrary, ptrdiff_t aLOffset,