From d7e8a09c21b686eb8de06031ab23d88d77d68619 Mon Sep 17 00:00:00 2001 From: Andi-Bogdan Postelnicu Date: Mon, 13 Feb 2023 15:02:07 +0000 Subject: [PATCH] Bug 1519636 - Reformat recent changes to the Google coding style. r=glandium Updated with clang-format version 15.0.5 (taskcluster-MKK8dHUpQkGfPLA793lizg) # ignore-this-changeset Differential Revision: https://phabricator.services.mozilla.com/D168658 --- accessible/html/HTMLFormControlAccessible.cpp | 3 ++- accessible/mac/GeckoTextMarker.mm | 4 ++-- accessible/mac/MOXTextMarkerDelegate.h | 4 ++-- accessible/mac/MacUtils.h | 6 +++--- accessible/mac/MacUtils.mm | 6 +++--- accessible/mac/mozAccessible.h | 4 ++-- .../unit/insertIEHistory/InsertIEHistory.cpp | 3 +-- build/unix/elfhack/test.c | 2 +- dom/base/JSExecutionContext.cpp | 4 ++-- dom/canvas/MurmurHash3.cpp | 2 +- dom/canvas/TiedFields.h | 2 +- dom/html/nsHTMLDocument.cpp | 2 +- dom/media/ogg/OggDemuxer.cpp | 2 +- dom/media/webaudio/OscillatorNode.cpp | 1 - dom/system/OSFileConstants.cpp | 12 ++++++++---- dom/xul/XULResizerElement.cpp | 4 ++-- extensions/auth/gssapi.h | 2 +- .../spellcheck/src/mozInlineSpellWordUtil.h | 2 +- gfx/2d/MMIHelpers.h | 14 +++++++------- gfx/layers/SurfacePoolCA.mm | 2 +- gfx/layers/client/TextureClientPool.cpp | 2 +- gfx/src/nsRegion.h | 2 +- gfx/tests/gtest/TestRegion.cpp | 2 +- image/ImgDrawResult.h | 15 +++++++++++---- image/imgRequestProxy.cpp | 5 +++-- intl/components/gtest/TestDisplayNames.cpp | 3 +-- ipc/chromium/src/base/chrome_application_mac.h | 2 +- js/public/CompileOptions.h | 4 ++-- js/public/Utility.h | 6 +++--- js/src/devtools/vprof/testVprofMT.c | 4 ++-- js/src/devtools/vprof/vprof.h | 6 +++--- js/src/jit/JitSpewer.cpp | 2 +- js/src/jit/WarpSnapshot.cpp | 2 +- .../AtomicOperations-feeling-lucky-gcc.h | 2 +- js/src/jsapi-tests/testHashTable.cpp | 2 +- js/src/util/StructuredSpewer.cpp | 2 +- js/xpconnect/src/XPCConvert.cpp | 2 +- js/xpconnect/src/XPCWrappedNativeInfo.cpp | 4 ++-- layout/forms/nsCheckboxRadioFrame.cpp | 2 +- layout/forms/nsComboboxControlFrame.h | 12 ++++++------ layout/mathml/nsIMathMLFrame.h | 2 +- layout/mathml/nsMathMLChar.cpp | 2 +- layout/style/nsStyleTransformMatrix.cpp | 2 +- layout/tables/SpanningCellSorter.cpp | 2 +- mfbt/tests/TestUtf8.cpp | 18 +++++++++--------- mozglue/android/APKOpen.cpp | 2 +- mozglue/baseprofiler/core/RegisteredThread.h | 4 +--- mozglue/baseprofiler/public/ProgressLogger.h | 2 +- mozglue/linker/Elfxx.h | 8 ++++---- mozglue/tests/TestBaseProfiler.cpp | 3 ++- netwerk/cache2/CacheFileIOManager.h | 2 +- netwerk/sctp/datachannel/DataChannel.h | 4 +--- parser/htmlparser/nsScanner.cpp | 2 +- testing/mochitest/ssltunnel/ssltunnel.cpp | 16 ++++++++-------- .../crashreporter/client/crashreporter_osx.mm | 2 +- tools/jprof/intcnt.h | 2 +- tools/profiler/public/MicroGeckoProfiler.h | 3 ++- .../tests/gtest/LulTestInfrastructure.h | 11 ++++++----- ...diaHardwareKeysEventSourceMacMediaCenter.mm | 4 ++-- widget/cocoa/nsMenuItemX.mm | 2 +- widget/uikit/nsWidgetFactory.mm | 4 ++-- widget/windows/nsWindowDbg.h | 8 ++++---- xpcom/base/MacHelpers.mm | 2 +- xpcom/base/MacStringHelpers.h | 2 +- xpcom/base/MacStringHelpers.mm | 2 +- xpcom/base/nsDebug.h | 6 +++--- xpcom/base/nsObjCExceptions.h | 2 +- xpcom/tests/TestStreamUtils.cpp | 4 +++- xpcom/tests/gtest/TestExpirationTracker.cpp | 4 +++- 69 files changed, 151 insertions(+), 138 deletions(-) diff --git a/accessible/html/HTMLFormControlAccessible.cpp b/accessible/html/HTMLFormControlAccessible.cpp index a632a315130a..c6e610ca42be 100644 --- a/accessible/html/HTMLFormControlAccessible.cpp +++ b/accessible/html/HTMLFormControlAccessible.cpp @@ -101,7 +101,8 @@ void HTMLRadioButtonAccessible::DOMAttributeChanged( } else { // Otherwise, handle this attribute change the way our parent // class wants us to handle it. - RadioButtonAccessible::DOMAttributeChanged(aNameSpaceID, aAttribute, aModType, aOldValue, aOldState); + RadioButtonAccessible::DOMAttributeChanged(aNameSpaceID, aAttribute, + aModType, aOldValue, aOldState); } } diff --git a/accessible/mac/GeckoTextMarker.mm b/accessible/mac/GeckoTextMarker.mm index d7233964f0dc..305f2c29f4c5 100644 --- a/accessible/mac/GeckoTextMarker.mm +++ b/accessible/mac/GeckoTextMarker.mm @@ -586,5 +586,5 @@ bool GeckoTextMarkerRange::Crop(Accessible* aContainer) { return true; } -} -} +} // namespace a11y +} // namespace mozilla diff --git a/accessible/mac/MOXTextMarkerDelegate.h b/accessible/mac/MOXTextMarkerDelegate.h index 7a0161a6b8c1..f1d40f6ffa05 100644 --- a/accessible/mac/MOXTextMarkerDelegate.h +++ b/accessible/mac/MOXTextMarkerDelegate.h @@ -165,5 +165,5 @@ enum AXTextSelectionGranularity { AXTextSelectionGranularityDocument, AXTextSelectionGranularityAll }; -} -} +} // namespace a11y +} // namespace mozilla diff --git a/accessible/mac/MacUtils.h b/accessible/mac/MacUtils.h index 3f095a7996a2..89a38354bf24 100644 --- a/accessible/mac/MacUtils.h +++ b/accessible/mac/MacUtils.h @@ -44,8 +44,8 @@ NSString* LocalizedString(const nsString& aString); * nil if no attribute is found. */ NSString* GetAccAttr(mozAccessible* aNativeAccessible, nsAtom* aAttrName); -} -} -} +} // namespace utils +} // namespace a11y +} // namespace mozilla #endif diff --git a/accessible/mac/MacUtils.mm b/accessible/mac/MacUtils.mm index 7fbb0e9ba427..3699ffdfe298 100644 --- a/accessible/mac/MacUtils.mm +++ b/accessible/mac/MacUtils.mm @@ -44,6 +44,6 @@ NSString* GetAccAttr(mozAccessible* aNativeAccessible, nsAtom* aAttrName) { return nil; } -} -} -} +} // namespace utils +} // namespace a11y +} // namespace mozilla diff --git a/accessible/mac/mozAccessible.h b/accessible/mac/mozAccessible.h index 3288b0cd9727..62f04e11ef47 100644 --- a/accessible/mac/mozAccessible.h +++ b/accessible/mac/mozAccessible.h @@ -39,8 +39,8 @@ inline mozAccessible* GetNativeFromGeckoAccessible( return reinterpret_cast(proxy->GetWrapper()); } -} // a11y -} // mozilla +} // namespace a11y +} // namespace mozilla @interface mozAccessible : MOXAccessibleBase { /** diff --git a/browser/components/migration/tests/unit/insertIEHistory/InsertIEHistory.cpp b/browser/components/migration/tests/unit/insertIEHistory/InsertIEHistory.cpp index cdc1faff7df1..bd4f69657a51 100644 --- a/browser/components/migration/tests/unit/insertIEHistory/InsertIEHistory.cpp +++ b/browser/components/migration/tests/unit/insertIEHistory/InsertIEHistory.cpp @@ -28,8 +28,7 @@ int main(int argc, char** argv) { hr = ieHist->AddUrl(L"http://www.mozilla.org/1", L"Mozilla HTTP Test", 0); if (FAILED(hr)) return -3; - hr = ieHist->AddUrl(L"https://www.mozilla.org/2", L"Mozilla HTTPS Test 🦊", - 0); + hr = ieHist->AddUrl(L"https://www.mozilla.org/2", L"Mozilla HTTPS Test 🦊", 0); if (FAILED(hr)) return -4; CoUninitialize(); diff --git a/build/unix/elfhack/test.c b/build/unix/elfhack/test.c index a10833e52179..dda566deb23d 100644 --- a/build/unix/elfhack/test.c +++ b/build/unix/elfhack/test.c @@ -89,7 +89,7 @@ DEF(times) # include # include -# define DEF(w) static const char str_##w[] = # w; +# define DEF(w) static const char str_##w[] = #w; # include "test.c" # undef DEF diff --git a/dom/base/JSExecutionContext.cpp b/dom/base/JSExecutionContext.cpp index b99659982419..af8eafb3324f 100644 --- a/dom/base/JSExecutionContext.cpp +++ b/dom/base/JSExecutionContext.cpp @@ -96,8 +96,8 @@ nsresult JSExecutionContext::JoinOffThread( MOZ_ASSERT(!mWantsReturnValue); JS::Rooted storage(mCx); - RefPtr stencil = JS::FinishOffThreadStencil( - mCx, *aOffThreadToken, storage.address()); + RefPtr stencil = + JS::FinishOffThreadStencil(mCx, *aOffThreadToken, storage.address()); *aOffThreadToken = nullptr; // Mark the token as having been finished. if (!stencil) { mSkip = true; diff --git a/dom/canvas/MurmurHash3.cpp b/dom/canvas/MurmurHash3.cpp index 1a92e75ff040..553f23cdfd71 100644 --- a/dom/canvas/MurmurHash3.cpp +++ b/dom/canvas/MurmurHash3.cpp @@ -31,7 +31,7 @@ namespace { // We can't do always_inline, becasue -Werror -Wattribute will trigger // a "might not be able to inline" warning. -//#define FORCE_INLINE __attribute__((always_inline)) +// #define FORCE_INLINE __attribute__((always_inline)) # define FORCE_INLINE inline inline uint32_t rotl32(uint32_t x, int8_t r) { diff --git a/dom/canvas/TiedFields.h b/dom/canvas/TiedFields.h index 88d6efd91071..4b0630056844 100644 --- a/dom/canvas/TiedFields.h +++ b/dom/canvas/TiedFields.h @@ -144,7 +144,7 @@ static_assert(AreAllBytesTiedFields()); // - -//#define LETS_USE_BIT_FIELDS +// #define LETS_USE_BIT_FIELDS #ifdef LETS_USE_BIT_FIELDS # undef LETS_USE_BIT_FIELDS diff --git a/dom/html/nsHTMLDocument.cpp b/dom/html/nsHTMLDocument.cpp index 885e4d3d2474..a524d88e4094 100644 --- a/dom/html/nsHTMLDocument.cpp +++ b/dom/html/nsHTMLDocument.cpp @@ -93,7 +93,7 @@ using namespace mozilla::dom; #include "prtime.h" -//#define DEBUG_charset +// #define DEBUG_charset // ================================================================== // = diff --git a/dom/media/ogg/OggDemuxer.cpp b/dom/media/ogg/OggDemuxer.cpp index 3885a594000d..02116410e13d 100644 --- a/dom/media/ogg/OggDemuxer.cpp +++ b/dom/media/ogg/OggDemuxer.cpp @@ -31,7 +31,7 @@ extern mozilla::LazyLogModule gMediaDemuxerLog; __func__, ##__VA_ARGS__) // Un-comment to enable logging of seek bisections. -//#define SEEK_LOGGING +// #define SEEK_LOGGING #ifdef SEEK_LOGGING # define SEEK_LOG(type, msg) MOZ_LOG(gMediaDemuxerLog, type, msg) #else diff --git a/dom/media/webaudio/OscillatorNode.cpp b/dom/media/webaudio/OscillatorNode.cpp index 317cfd4ba3c6..b18b0a0fe1a3 100644 --- a/dom/media/webaudio/OscillatorNode.cpp +++ b/dom/media/webaudio/OscillatorNode.cpp @@ -288,7 +288,6 @@ class OscillatorNodeEngine final : public AudioNodeEngine { MOZ_ASSERT(mSource == aTrack, "Invalid source track"); TRACE("OscillatorNodeEngine::ProcessBlock"); - TrackTime ticks = mDestination->GraphTimeToTrackTime(aFrom); if (mStart == -1) { ComputeSilence(aOutput); diff --git a/dom/system/OSFileConstants.cpp b/dom/system/OSFileConstants.cpp index fa7e9532af5d..acbec52719a0 100644 --- a/dom/system/OSFileConstants.cpp +++ b/dom/system/OSFileConstants.cpp @@ -248,8 +248,10 @@ nsresult OSFileConstantsService::InitOSFileConstants() { * * Produces a |ConstantSpec|. */ -#define INT_CONSTANT(name) \ - { #name, JS::Int32Value(name) } +#define INT_CONSTANT(name) \ + { \ +# name, JS::Int32Value(name) \ + } /** * Define a simple read-only property holding an unsigned integer. @@ -259,8 +261,10 @@ nsresult OSFileConstantsService::InitOSFileConstants() { * * Produces a |ConstantSpec|. */ -#define UINT_CONSTANT(name) \ - { #name, JS::NumberValue(name) } +#define UINT_CONSTANT(name) \ + { \ +# name, JS::NumberValue(name) \ + } /** * End marker for ConstantSpec diff --git a/dom/xul/XULResizerElement.cpp b/dom/xul/XULResizerElement.cpp index 9b2c6e534ece..a0dbb485d52d 100644 --- a/dom/xul/XULResizerElement.cpp +++ b/dom/xul/XULResizerElement.cpp @@ -118,8 +118,8 @@ Maybe XULResizerElement::GetCurrentSize() const { return Nothing(); } return Some(frame->StylePosition()->mBoxSizing == StyleBoxSizing::Content - ? frame->GetContentRect().Size() - : frame->GetRect().Size()); + ? frame->GetContentRect().Size() + : frame->GetRect().Size()); } void XULResizerElement::PostHandleEventInternal( diff --git a/extensions/auth/gssapi.h b/extensions/auth/gssapi.h index 7ab0187fcf9e..826d69df79d5 100644 --- a/extensions/auth/gssapi.h +++ b/extensions/auth/gssapi.h @@ -175,7 +175,7 @@ typedef struct gss_channel_bindings_struct { OM_uint32 acceptor_addrtype; gss_buffer_desc acceptor_address; gss_buffer_desc application_data; -} * gss_channel_bindings_t; +}* gss_channel_bindings_t; /* * Flag bits for context-level services. diff --git a/extensions/spellcheck/src/mozInlineSpellWordUtil.h b/extensions/spellcheck/src/mozInlineSpellWordUtil.h index d53b90c0f1cc..2a1b4b912e82 100644 --- a/extensions/spellcheck/src/mozInlineSpellWordUtil.h +++ b/extensions/spellcheck/src/mozInlineSpellWordUtil.h @@ -17,7 +17,7 @@ #include "nsString.h" #include "nsTArray.h" -//#define DEBUG_SPELLCHECK +// #define DEBUG_SPELLCHECK class nsRange; class nsINode; diff --git a/gfx/2d/MMIHelpers.h b/gfx/2d/MMIHelpers.h index 72e2ea5df3d9..3b0a287230ff 100644 --- a/gfx/2d/MMIHelpers.h +++ b/gfx/2d/MMIHelpers.h @@ -11,13 +11,13 @@ #ifndef __MMI_HELPERS_H__ #define __MMI_HELPERS_H__ -#define __mm_packxxxx(_f, _D, _d, _s, _t) \ -# _f " %[" # _t "], %[" # _d "h], %[" # _s "h] \n\t" # _f " %[" # _D \ - "l], %[" # _d "l], %[" # _s \ - "l] \n\t" \ - "punpckhwd %[" # _D "h], %[" # _D "l], %[" # _t \ - "] \n\t" \ - "punpcklwd %[" # _D "l], %[" # _D "l], %[" # _t "] \n\t" +#define __mm_packxxxx(_f, _D, _d, _s, _t) \ +# _f " %[" #_t "], %[" #_d "h], %[" #_s "h] \n\t" #_f " %[" #_D "l], %[" #_d \ + "l], %[" #_s \ + "l] \n\t" \ + "punpckhwd %[" #_D "h], %[" #_D "l], %[" #_t \ + "] \n\t" \ + "punpcklwd %[" #_D "l], %[" #_D "l], %[" #_t "] \n\t" #define _mm_or(_D, _d, _s) \ "or %[" #_D "h], %[" #_d "h], %[" #_s \ diff --git a/gfx/layers/SurfacePoolCA.mm b/gfx/layers/SurfacePoolCA.mm index 718b1e44c6f9..e127e41529c4 100644 --- a/gfx/layers/SurfacePoolCA.mm +++ b/gfx/layers/SurfacePoolCA.mm @@ -23,9 +23,9 @@ namespace mozilla { namespace layers { using gfx::IntPoint; -using gfx::IntSize; using gfx::IntRect; using gfx::IntRegion; +using gfx::IntSize; using gl::GLContext; using gl::GLContextCGL; diff --git a/gfx/layers/client/TextureClientPool.cpp b/gfx/layers/client/TextureClientPool.cpp index 2ca0ce20e837..1dbef5fb84f1 100644 --- a/gfx/layers/client/TextureClientPool.cpp +++ b/gfx/layers/client/TextureClientPool.cpp @@ -13,7 +13,7 @@ #include "nsComponentManagerUtils.h" #define TCP_LOG(...) -//#define TCP_LOG(...) printf_stderr(__VA_ARGS__); +// #define TCP_LOG(...) printf_stderr(__VA_ARGS__); namespace mozilla { namespace layers { diff --git a/gfx/src/nsRegion.h b/gfx/src/nsRegion.h index eb8c80960f16..505e55e2f2c1 100644 --- a/gfx/src/nsRegion.h +++ b/gfx/src/nsRegion.h @@ -26,7 +26,7 @@ #include "pixman.h" // Uncomment this line to get additional integrity checking. -//#define DEBUG_REGIONS +// #define DEBUG_REGIONS #ifdef DEBUG_REGIONS # include #endif diff --git a/gfx/tests/gtest/TestRegion.cpp b/gfx/tests/gtest/TestRegion.cpp index 4584168c952b..87a699ad78cb 100644 --- a/gfx/tests/gtest/TestRegion.cpp +++ b/gfx/tests/gtest/TestRegion.cpp @@ -13,7 +13,7 @@ using namespace mozilla::gfx; -//#define REGION_RANDOM_STRESS_TESTS +// #define REGION_RANDOM_STRESS_TESTS class TestLargestRegion { public: diff --git a/image/ImgDrawResult.h b/image/ImgDrawResult.h index 957b511b0ab1..d33b63d71ce7 100644 --- a/image/ImgDrawResult.h +++ b/image/ImgDrawResult.h @@ -55,10 +55,17 @@ namespace image { * NOT_SUPPORTED: The requested operation is not supported, but the image is * otherwise valid. */ -enum class [[nodiscard]] ImgDrawResult : uint8_t{ - SUCCESS, SUCCESS_NOT_COMPLETE, INCOMPLETE, WRONG_SIZE, - NOT_READY, TEMPORARY_ERROR, BAD_IMAGE, BAD_ARGS, - NOT_SUPPORTED}; +enum class [[nodiscard]] ImgDrawResult : uint8_t { + SUCCESS, + SUCCESS_NOT_COMPLETE, + INCOMPLETE, + WRONG_SIZE, + NOT_READY, + TEMPORARY_ERROR, + BAD_IMAGE, + BAD_ARGS, + NOT_SUPPORTED +}; /** * You can combine ImgDrawResults with &. By analogy to bitwise-&, the result is diff --git a/image/imgRequestProxy.cpp b/image/imgRequestProxy.cpp index 8511ef3afb6e..5ebc20d0b6a4 100644 --- a/image/imgRequestProxy.cpp +++ b/image/imgRequestProxy.cpp @@ -1151,8 +1151,9 @@ already_AddRefed imgRequestProxy::GetStaticRequest( bool hadCrossOriginRedirects = true; GetHadCrossOriginRedirects(&hadCrossOriginRedirects); nsCOMPtr triggeringPrincipal = GetTriggeringPrincipal(); - RefPtr req = new imgRequestProxyStatic( - frozenImage, currentPrincipal, triggeringPrincipal, hadCrossOriginRedirects); + RefPtr req = + new imgRequestProxyStatic(frozenImage, currentPrincipal, + triggeringPrincipal, hadCrossOriginRedirects); req->Init(nullptr, nullptr, aLoadingDocument, mURI, nullptr); return req.forget(); diff --git a/intl/components/gtest/TestDisplayNames.cpp b/intl/components/gtest/TestDisplayNames.cpp index 268767bf42a2..36980f484b44 100644 --- a/intl/components/gtest/TestDisplayNames.cpp +++ b/intl/components/gtest/TestDisplayNames.cpp @@ -285,8 +285,7 @@ TEST(IntlDisplayNames, Calendar) { // Code with non-ascii alpha letters. - auto err = - displayNames->GetCalendar(buffer, MakeStringSpan("🥸 not ascii")); + auto err = displayNames->GetCalendar(buffer, MakeStringSpan("🥸 not ascii")); ASSERT_TRUE(err.isErr()); ASSERT_EQ(err.unwrapErr(), DisplayNamesError::InvalidOption); } diff --git a/ipc/chromium/src/base/chrome_application_mac.h b/ipc/chromium/src/base/chrome_application_mac.h index 363cb7a21a74..bf968dad5ed0 100644 --- a/ipc/chromium/src/base/chrome_application_mac.h +++ b/ipc/chromium/src/base/chrome_application_mac.h @@ -54,6 +54,6 @@ class ScopedSendingEvent { DISALLOW_COPY_AND_ASSIGN(ScopedSendingEvent); }; -} // chrome_application_mac +} // namespace chrome_application_mac #endif // BASE_CHROME_APPLICATION_MAC_H_ diff --git a/js/public/CompileOptions.h b/js/public/CompileOptions.h index 462b659b0ce6..26e5b270d6c1 100644 --- a/js/public/CompileOptions.h +++ b/js/public/CompileOptions.h @@ -302,7 +302,7 @@ class JS_PUBLIC_API TransitiveCompileOptions { #if defined(DEBUG) || defined(JS_JITSPEW) template void dumpWith(Printer& print) const { -# define PrintFields_(Name) print(# Name, Name) +# define PrintFields_(Name) print(#Name, Name) PrintFields_(filename_); PrintFields_(introducerFilename_); PrintFields_(sourceMapURL_); @@ -381,7 +381,7 @@ class JS_PUBLIC_API ReadOnlyCompileOptions : public TransitiveCompileOptions { template void dumpWith(Printer& print) const { this->TransitiveCompileOptions::dumpWith(print); -# define PrintFields_(Name) print(# Name, Name) +# define PrintFields_(Name) print(#Name, Name) PrintFields_(lineno); PrintFields_(column); PrintFields_(scriptSourceOffset); diff --git a/js/public/Utility.h b/js/public/Utility.h index 7176320e64de..7979740bedf1 100644 --- a/js/public/Utility.h +++ b/js/public/Utility.h @@ -642,13 +642,13 @@ typedef mozilla::UniquePtr UniqueLatin1Chars; #ifndef HAVE_STATIC_ANNOTATIONS # define HAVE_STATIC_ANNOTATIONS # ifdef XGILL_PLUGIN -# define STATIC_PRECONDITION(COND) __attribute__((precondition(# COND))) +# define STATIC_PRECONDITION(COND) __attribute__((precondition(#COND))) # define STATIC_PRECONDITION_ASSUME(COND) \ __attribute__((precondition_assume(#COND))) -# define STATIC_POSTCONDITION(COND) __attribute__((postcondition(# COND))) +# define STATIC_POSTCONDITION(COND) __attribute__((postcondition(#COND))) # define STATIC_POSTCONDITION_ASSUME(COND) \ __attribute__((postcondition_assume(#COND))) -# define STATIC_INVARIANT(COND) __attribute__((invariant(# COND))) +# define STATIC_INVARIANT(COND) __attribute__((invariant(#COND))) # define STATIC_INVARIANT_ASSUME(COND) \ __attribute__((invariant_assume(#COND))) # define STATIC_ASSUME(COND) \ diff --git a/js/src/devtools/vprof/testVprofMT.c b/js/src/devtools/vprof/testVprofMT.c index 5fb6a80e1285..da85389565f3 100644 --- a/js/src/devtools/vprof/testVprofMT.c +++ b/js/src/devtools/vprof/testVprofMT.c @@ -21,8 +21,8 @@ static void cProbe(void* vprofID) { } //__declspec (thread) boolean cv; -//#define if(c) cv = (c); _vprof (cv); if (cv) -//#define if(c) cv = (c); _vprof (cv, cProbe); if (cv) +// #define if(c) cv = (c); _vprof (cv); if (cv) +// #define if(c) cv = (c); _vprof (cv, cProbe); if (cv) #define THREADS 1 #define COUNT 100000 diff --git a/js/src/devtools/vprof/vprof.h b/js/src/devtools/vprof/vprof.h index 946a04c98743..3d7b290d041b 100644 --- a/js/src/devtools/vprof/vprof.h +++ b/js/src/devtools/vprof/vprof.h @@ -86,7 +86,7 @@ uint64_t readTimestampCounter(); } #endif -//#define DOPROF +// #define DOPROF #ifndef DOPROF # define _nvprof(e, v) @@ -216,7 +216,7 @@ typedef struct hist { int nbins; int64_t* lb; int64_t* count; -} * hist_t; +}* hist_t; typedef struct entry entry; @@ -242,7 +242,7 @@ typedef struct entry { // char pad[128]; // avoid false sharing -} * entry_t; +}* entry_t; #define _VAL ((entry_t)vprofID)->value #define _COUNT ((entry_t)vprofID)->count diff --git a/js/src/jit/JitSpewer.cpp b/js/src/jit/JitSpewer.cpp index d85fbcf3d39f..729e1fb306df 100644 --- a/js/src/jit/JitSpewer.cpp +++ b/js/src/jit/JitSpewer.cpp @@ -71,7 +71,7 @@ static uint64_t LoggingBits = 0; static mozilla::Atomic filteredOutCompilations(0); static const char* const ChannelNames[] = { -# define JITSPEW_CHANNEL(name) # name, +# define JITSPEW_CHANNEL(name) #name, JITSPEW_CHANNEL_LIST(JITSPEW_CHANNEL) # undef JITSPEW_CHANNEL }; diff --git a/js/src/jit/WarpSnapshot.cpp b/js/src/jit/WarpSnapshot.cpp index ceb024f96c16..c81280e48bad 100644 --- a/js/src/jit/WarpSnapshot.cpp +++ b/js/src/jit/WarpSnapshot.cpp @@ -103,7 +103,7 @@ void WarpScriptSnapshot::dump(GenericPrinter& out) const { static const char* OpSnapshotKindString(WarpOpSnapshot::Kind kind) { static const char* const names[] = { -# define NAME(x) # x, +# define NAME(x) #x, WARP_OP_SNAPSHOT_LIST(NAME) # undef NAME }; diff --git a/js/src/jit/shared/AtomicOperations-feeling-lucky-gcc.h b/js/src/jit/shared/AtomicOperations-feeling-lucky-gcc.h index 8f700aaab34a..d4bf3430ff72 100644 --- a/js/src/jit/shared/AtomicOperations-feeling-lucky-gcc.h +++ b/js/src/jit/shared/AtomicOperations-feeling-lucky-gcc.h @@ -101,7 +101,7 @@ // and earlier, and probably for Clang 3.1, should we need to use those // versions. Firefox no longer supports compilers that old. -//#define ATOMICS_IMPLEMENTED_WITH_SYNC_INTRINSICS +// #define ATOMICS_IMPLEMENTED_WITH_SYNC_INTRINSICS // Sanity check. diff --git a/js/src/jsapi-tests/testHashTable.cpp b/js/src/jsapi-tests/testHashTable.cpp index f643e1bf6b15..4cd55f4cba73 100644 --- a/js/src/jsapi-tests/testHashTable.cpp +++ b/js/src/jsapi-tests/testHashTable.cpp @@ -11,7 +11,7 @@ #include "js/Utility.h" #include "jsapi-tests/tests.h" -//#define FUZZ +// #define FUZZ typedef js::HashMap, js::SystemAllocPolicy> diff --git a/js/src/util/StructuredSpewer.cpp b/js/src/util/StructuredSpewer.cpp index c5297f200ebe..509ffb4e011b 100644 --- a/js/src/util/StructuredSpewer.cpp +++ b/js/src/util/StructuredSpewer.cpp @@ -18,7 +18,7 @@ using namespace js; const StructuredSpewer::NameArray StructuredSpewer::names_ = { -# define STRUCTURED_CHANNEL(name) # name, +# define STRUCTURED_CHANNEL(name) #name, STRUCTURED_CHANNEL_LIST(STRUCTURED_CHANNEL) # undef STRUCTURED_CHANNEL }; diff --git a/js/xpconnect/src/XPCConvert.cpp b/js/xpconnect/src/XPCConvert.cpp index 8a8038f5f122..ef7cf0d83f58 100644 --- a/js/xpconnect/src/XPCConvert.cpp +++ b/js/xpconnect/src/XPCConvert.cpp @@ -41,7 +41,7 @@ using namespace mozilla; using namespace mozilla::dom; using namespace JS; -//#define STRICT_CHECK_OF_UNICODE +// #define STRICT_CHECK_OF_UNICODE #ifdef STRICT_CHECK_OF_UNICODE # define ILLEGAL_RANGE(c) (0 != ((c)&0xFF80)) #else // STRICT_CHECK_OF_UNICODE diff --git a/js/xpconnect/src/XPCWrappedNativeInfo.cpp b/js/xpconnect/src/XPCWrappedNativeInfo.cpp index 3b2544eb26a8..fbd65735e51c 100644 --- a/js/xpconnect/src/XPCWrappedNativeInfo.cpp +++ b/js/xpconnect/src/XPCWrappedNativeInfo.cpp @@ -345,7 +345,7 @@ already_AddRefed XPCNativeInterface::NewInstance( // static void XPCNativeInterface::DestroyInstance(XPCNativeInterface* inst) { inst->~XPCNativeInterface(); - delete[](char*) inst; + delete[] (char*)inst; } size_t XPCNativeInterface::SizeOfIncludingThis(MallocSizeOf mallocSizeOf) { @@ -703,7 +703,7 @@ already_AddRefed XPCNativeSet::NewInstanceMutate( // static void XPCNativeSet::DestroyInstance(XPCNativeSet* inst) { inst->~XPCNativeSet(); - delete[](char*) inst; + delete[] (char*)inst; } size_t XPCNativeSet::SizeOfIncludingThis(MallocSizeOf mallocSizeOf) { diff --git a/layout/forms/nsCheckboxRadioFrame.cpp b/layout/forms/nsCheckboxRadioFrame.cpp index 6c9eb090a95c..2bb8cc48ce91 100644 --- a/layout/forms/nsCheckboxRadioFrame.cpp +++ b/layout/forms/nsCheckboxRadioFrame.cpp @@ -16,7 +16,7 @@ using namespace mozilla; using mozilla::dom::HTMLInputElement; -//#define FCF_NOISY +// #define FCF_NOISY nsCheckboxRadioFrame* NS_NewCheckboxRadioFrame(PresShell* aPresShell, ComputedStyle* aStyle) { diff --git a/layout/forms/nsComboboxControlFrame.h b/layout/forms/nsComboboxControlFrame.h index 6bc3db109838..434106636ebb 100644 --- a/layout/forms/nsComboboxControlFrame.h +++ b/layout/forms/nsComboboxControlFrame.h @@ -8,15 +8,15 @@ #define nsComboboxControlFrame_h___ #ifdef DEBUG_evaughan -//#define DEBUG_rods +// #define DEBUG_rods #endif #ifdef DEBUG_rods -//#define DO_REFLOW_DEBUG -//#define DO_REFLOW_COUNTER -//#define DO_UNCONSTRAINED_CHECK -//#define DO_PIXELS -//#define DO_NEW_REFLOW +// #define DO_REFLOW_DEBUG +// #define DO_REFLOW_COUNTER +// #define DO_UNCONSTRAINED_CHECK +// #define DO_PIXELS +// #define DO_NEW_REFLOW #endif // Mark used to indicate when onchange has been fired for current combobox item diff --git a/layout/mathml/nsIMathMLFrame.h b/layout/mathml/nsIMathMLFrame.h index eb1be05784e6..03eb412a15b8 100644 --- a/layout/mathml/nsIMathMLFrame.h +++ b/layout/mathml/nsIMathMLFrame.h @@ -3,7 +3,7 @@ /* 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/. */ -//#define SHOW_BOUNDING_BOX 1 +// #define SHOW_BOUNDING_BOX 1 #ifndef nsIMathMLFrame_h___ #define nsIMathMLFrame_h___ diff --git a/layout/mathml/nsMathMLChar.cpp b/layout/mathml/nsMathMLChar.cpp index 49e98d25aa5a..8ea4bd34ba3d 100644 --- a/layout/mathml/nsMathMLChar.cpp +++ b/layout/mathml/nsMathMLChar.cpp @@ -48,7 +48,7 @@ using namespace mozilla; using namespace mozilla::gfx; using namespace mozilla::image; -//#define NOISY_SEARCH 1 +// #define NOISY_SEARCH 1 // BUG 848725 Drawing failure with stretchy horizontal parenthesis when no fonts // are installed. "kMaxScaleFactor" is required to limit the scale for the diff --git a/layout/style/nsStyleTransformMatrix.cpp b/layout/style/nsStyleTransformMatrix.cpp index a8252c36956c..cefe1adaab61 100644 --- a/layout/style/nsStyleTransformMatrix.cpp +++ b/layout/style/nsStyleTransformMatrix.cpp @@ -36,7 +36,7 @@ namespace nsStyleTransformMatrix { // correctly, since when the frames are initially being reflowed, their // continuations all compute their bounding rects independently of each other // and consequently get the wrong value. -//#define UNIFIED_CONTINUATIONS +// #define UNIFIED_CONTINUATIONS void TransformReferenceBox::EnsureDimensionsAreCached() { if (mIsCached) { diff --git a/layout/tables/SpanningCellSorter.cpp b/layout/tables/SpanningCellSorter.cpp index 781e013e2dec..8778c8cfdeb1 100644 --- a/layout/tables/SpanningCellSorter.cpp +++ b/layout/tables/SpanningCellSorter.cpp @@ -14,7 +14,7 @@ using namespace mozilla; -//#define DEBUG_SPANNING_CELL_SORTER +// #define DEBUG_SPANNING_CELL_SORTER SpanningCellSorter::SpanningCellSorter() : mState(ADDING), diff --git a/mfbt/tests/TestUtf8.cpp b/mfbt/tests/TestUtf8.cpp index 437d751fea28..ee8810ab1163 100644 --- a/mfbt/tests/TestUtf8.cpp +++ b/mfbt/tests/TestUtf8.cpp @@ -378,15 +378,15 @@ static void TestDecodeOneValidUtf8CodePoint() { ExpectValidCodePoint(u8"ͼ", 0x37C); // GREEK SMALL DOTTED LUNATE SIGMA SYMBOL ExpectValidCodePoint(u8"Ӝ", 0x4DC); // CYRILLIC CAPITAL LETTER ZHE WITTH DIAERESIS - ExpectValidCodePoint(u8"۩", 0x6E9); // ARABIC PLACE OF SAJDAH + ExpectValidCodePoint(u8"۩", 0x6E9); // ARABIC PLACE OF SAJDAH ExpectValidCodePoint(u8"߿", 0x7FF); // // Length three. - ExpectValidCodePoint(u8"ࠀ", 0x800); // SAMARITAN LETTER ALAF - ExpectValidCodePoint(u8"ࡁ", 0x841); // MANDAIC LETTER AB + ExpectValidCodePoint(u8"ࠀ", 0x800); // SAMARITAN LETTER ALAF + ExpectValidCodePoint(u8"ࡁ", 0x841); // MANDAIC LETTER AB ExpectValidCodePoint(u8"ࣿ", 0x8FF); // ARABIC MARK SIDEWAYS NOON GHUNNA - ExpectValidCodePoint(u8"ஆ", 0xB86); // TAMIL LETTER AA + ExpectValidCodePoint(u8"ஆ", 0xB86); // TAMIL LETTER AA ExpectValidCodePoint(u8"༃", 0xF03); // TIBETAN MARK GTER YIG MGO -UM GTER TSHEG MA ExpectValidCodePoint( @@ -404,7 +404,7 @@ static void TestDecodeOneValidUtf8CodePoint() { ExpectValidCodePoint(u8"ꔄ", 0xA504); // VAI SYLLABLE WEEN ExpectValidCodePoint(u8"ퟕ", 0xD7D5); // HANGUL JONGSEONG RIEUL-SSANGKIYEOK ExpectValidCodePoint(u8"퟿", 0xD7FF); // - ExpectValidCodePoint(u8"", 0xE000); // + ExpectValidCodePoint(u8"", 0xE000); // ExpectValidCodePoint(u8"鱗", 0xF9F2); // CJK COMPATIBILITY IDEOGRAPH-F9F ExpectValidCodePoint( u8"﷽", 0xFDFD); // ARABIC LIGATURE BISMILLAH AR-RAHMAN AR-RAHHHEEEEM @@ -412,17 +412,17 @@ static void TestDecodeOneValidUtf8CodePoint() { // Length four. ExpectValidCodePoint(u8"𐀀", 0x10000); // LINEAR B SYLLABLE B008 A - ExpectValidCodePoint(u8"𔑀", 0x14440); // ANATOLIAN HIEROGLYPH A058 + ExpectValidCodePoint(u8"𔑀", 0x14440); // ANATOLIAN HIEROGLYPH A058 ExpectValidCodePoint(u8"𝛗", 0x1D6D7); // MATHEMATICAL BOLD SMALL PHI ExpectValidCodePoint(u8"💩", 0x1F4A9); // PILE OF POO ExpectValidCodePoint(u8"🔫", 0x1F52B); // PISTOL - ExpectValidCodePoint(u8"🥌", 0x1F94C); // CURLING STONE - ExpectValidCodePoint(u8"🥏", 0x1F94F); // FLYING DISC + ExpectValidCodePoint(u8"🥌", 0x1F94C); // CURLING STONE + ExpectValidCodePoint(u8"🥏", 0x1F94F); // FLYING DISC ExpectValidCodePoint(u8"𠍆", 0x20346); // CJK UNIFIED IDEOGRAPH-20346 ExpectValidCodePoint(u8"𡠺", 0x2183A); // CJK UNIFIED IDEOGRAPH-2183A ExpectValidCodePoint(u8"񁟶", 0x417F6); // ExpectValidCodePoint(u8"񾠶", 0x7E836); // - ExpectValidCodePoint(u8"󾽧", 0xFEF67); // + ExpectValidCodePoint(u8"󾽧", 0xFEF67); // ExpectValidCodePoint(u8"􏿿", 0x10FFFF); // } diff --git a/mozglue/android/APKOpen.cpp b/mozglue/android/APKOpen.cpp index b37c8ce22b5b..679ea694d7c3 100644 --- a/mozglue/android/APKOpen.cpp +++ b/mozglue/android/APKOpen.cpp @@ -356,7 +356,7 @@ static void FreeArgv(char** argv, int argc) { // String was allocated with strndup, so need to use free to deallocate. free(argv[ix]); } - delete[](argv); + delete[] (argv); } extern "C" APKOPEN_EXPORT void MOZ_JNICALL diff --git a/mozglue/baseprofiler/core/RegisteredThread.h b/mozglue/baseprofiler/core/RegisteredThread.h index 013c3c65dbc0..baaf7dced661 100644 --- a/mozglue/baseprofiler/core/RegisteredThread.h +++ b/mozglue/baseprofiler/core/RegisteredThread.h @@ -74,9 +74,7 @@ class RacyRegisteredThread final { BaseProfilerThreadId ThreadId() const { return mThreadId; } - class ProfilingStack& ProfilingStack() { - return mProfilingStack; - } + class ProfilingStack& ProfilingStack() { return mProfilingStack; } const class ProfilingStack& ProfilingStack() const { return mProfilingStack; } private: diff --git a/mozglue/baseprofiler/public/ProgressLogger.h b/mozglue/baseprofiler/public/ProgressLogger.h index 5c4bd7ccc0dc..e15095faaabe 100644 --- a/mozglue/baseprofiler/public/ProgressLogger.h +++ b/mozglue/baseprofiler/public/ProgressLogger.h @@ -15,7 +15,7 @@ #include // Uncomment to printf ProcessLogger updates. -//#define DEBUG_PROCESSLOGGER +// #define DEBUG_PROCESSLOGGER #ifdef DEBUG_PROCESSLOGGER # include "mozilla/BaseProfilerUtils.h" diff --git a/mozglue/linker/Elfxx.h b/mozglue/linker/Elfxx.h index 4390d2ccc7e4..4baf923b557d 100644 --- a/mozglue/linker/Elfxx.h +++ b/mozglue/linker/Elfxx.h @@ -72,7 +72,7 @@ # define R_RELATIVE R_386_RELATIVE # define RELOC(n) DT_REL##n # define UNSUPPORTED_RELOC(n) DT_RELA##n -# define STR_RELOC(n) "DT_REL" # n +# define STR_RELOC(n) "DT_REL" #n # define Reloc Rel #elif defined(__x86_64__) @@ -84,7 +84,7 @@ # define R_RELATIVE R_X86_64_RELATIVE # define RELOC(n) DT_RELA##n # define UNSUPPORTED_RELOC(n) DT_REL##n -# define STR_RELOC(n) "DT_RELA" # n +# define STR_RELOC(n) "DT_RELA" #n # define Reloc Rela #elif defined(__arm__) @@ -109,7 +109,7 @@ # define R_RELATIVE R_ARM_RELATIVE # define RELOC(n) DT_REL##n # define UNSUPPORTED_RELOC(n) DT_RELA##n -# define STR_RELOC(n) "DT_REL" # n +# define STR_RELOC(n) "DT_REL" #n # define Reloc Rel #elif defined(__aarch64__) @@ -121,7 +121,7 @@ # define R_RELATIVE R_AARCH64_RELATIVE # define RELOC(n) DT_RELA##n # define UNSUPPORTED_RELOC(n) DT_REL##n -# define STR_RELOC(n) "DT_RELA" # n +# define STR_RELOC(n) "DT_RELA" #n # define Reloc Rela #else diff --git a/mozglue/tests/TestBaseProfiler.cpp b/mozglue/tests/TestBaseProfiler.cpp index 766b6e8b219a..634ce7c81289 100644 --- a/mozglue/tests/TestBaseProfiler.cpp +++ b/mozglue/tests/TestBaseProfiler.cpp @@ -5615,7 +5615,8 @@ void TestPredefinedMarkers() { MOZ_RELEASE_ASSERT(mozilla::baseprofiler::AddMarkerToBuffer( buffer, std::string_view("media"), mozilla::baseprofiler::category::OTHER, - {}, mozilla::baseprofiler::markers::VideoFallingBehindMarker{}, 123, 456)); + {}, mozilla::baseprofiler::markers::VideoFallingBehindMarker{}, 123, + 456)); # ifdef DEBUG buffer.Dump(); diff --git a/netwerk/cache2/CacheFileIOManager.h b/netwerk/cache2/CacheFileIOManager.h index f038f6b188ca..62533fb668a4 100644 --- a/netwerk/cache2/CacheFileIOManager.h +++ b/netwerk/cache2/CacheFileIOManager.h @@ -21,7 +21,7 @@ #include "nsTHashtable.h" #include "prio.h" -//#define DEBUG_HANDLES 1 +// #define DEBUG_HANDLES 1 class nsIFile; class nsITimer; diff --git a/netwerk/sctp/datachannel/DataChannel.h b/netwerk/sctp/datachannel/DataChannel.h index eefa48ad07cb..29649ec66c51 100644 --- a/netwerk/sctp/datachannel/DataChannel.h +++ b/netwerk/sctp/datachannel/DataChannel.h @@ -64,9 +64,7 @@ class OutgoingMsg { ~OutgoingMsg() = default; ; void Advance(size_t offset); - struct sctp_sendv_spa& GetInfo() { - return *mInfo; - }; + struct sctp_sendv_spa& GetInfo() { return *mInfo; }; size_t GetLength() const { return mLength; }; size_t GetLeft() const { return mLength - mPos; }; const uint8_t* GetData() { return (const uint8_t*)(mData + mPos); }; diff --git a/parser/htmlparser/nsScanner.cpp b/parser/htmlparser/nsScanner.cpp index e0f5f9228c32..ede8e7dc12e4 100644 --- a/parser/htmlparser/nsScanner.cpp +++ b/parser/htmlparser/nsScanner.cpp @@ -4,7 +4,7 @@ * 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/. */ -//#define __INCREMENTAL 1 +// #define __INCREMENTAL 1 #include "nsScanner.h" diff --git a/testing/mochitest/ssltunnel/ssltunnel.cpp b/testing/mochitest/ssltunnel/ssltunnel.cpp index 436c7126398f..e2377fcdf3c5 100644 --- a/testing/mochitest/ssltunnel/ssltunnel.cpp +++ b/testing/mochitest/ssltunnel/ssltunnel.cpp @@ -1473,35 +1473,35 @@ int parseConfigFile(const char* filePath) { } int freeHostCertHashItems(PLHashEntry* he, int i, void* arg) { - delete[](char*) he->key; - delete[](char*) he->value; + delete[] (char*)he->key; + delete[] (char*)he->value; return HT_ENUMERATE_REMOVE; } int freeHostRedirHashItems(PLHashEntry* he, int i, void* arg) { - delete[](char*) he->key; - delete[](char*) he->value; + delete[] (char*)he->key; + delete[] (char*)he->value; return HT_ENUMERATE_REMOVE; } int freeClientAuthHashItems(PLHashEntry* he, int i, void* arg) { - delete[](char*) he->key; + delete[] (char*)he->key; delete (client_auth_option*)he->value; return HT_ENUMERATE_REMOVE; } int freeSSL3HashItems(PLHashEntry* he, int i, void* arg) { - delete[](char*) he->key; + delete[] (char*)he->key; return HT_ENUMERATE_REMOVE; } int freeTLSHashItems(PLHashEntry* he, int i, void* arg) { - delete[](char*) he->key; + delete[] (char*)he->key; return HT_ENUMERATE_REMOVE; } int free3DESHashItems(PLHashEntry* he, int i, void* arg) { - delete[](char*) he->key; + delete[] (char*)he->key; return HT_ENUMERATE_REMOVE; } diff --git a/toolkit/crashreporter/client/crashreporter_osx.mm b/toolkit/crashreporter/client/crashreporter_osx.mm index 51540f50ce63..af5e838b1981 100644 --- a/toolkit/crashreporter/client/crashreporter_osx.mm +++ b/toolkit/crashreporter/client/crashreporter_osx.mm @@ -14,9 +14,9 @@ #include #include +using std::ostringstream; using std::string; using std::vector; -using std::ostringstream; using namespace CrashReporter; diff --git a/tools/jprof/intcnt.h b/tools/jprof/intcnt.h index 3c5820965a11..2cf9ec1ff1f1 100644 --- a/tools/jprof/intcnt.h +++ b/tools/jprof/intcnt.h @@ -33,7 +33,7 @@ class IntCount { struct IntPair { int idx; int cnt; - } * iPair; + }* iPair; }; #endif diff --git a/tools/profiler/public/MicroGeckoProfiler.h b/tools/profiler/public/MicroGeckoProfiler.h index a888232bcfe3..7b735e1eec0b 100644 --- a/tools/profiler/public/MicroGeckoProfiler.h +++ b/tools/profiler/public/MicroGeckoProfiler.h @@ -68,7 +68,8 @@ struct UprofilerFuncPtrs { static void register_thread_noop(const char* aName, void* aGuessStackTop) { /* no-op */ } -static void unregister_thread_noop() { /* no-op */ } +static void unregister_thread_noop() { /* no-op */ +} static void simple_event_marker_noop(const char* name, char phase, int num_args, const char** arg_names, const unsigned char* arg_types, diff --git a/tools/profiler/tests/gtest/LulTestInfrastructure.h b/tools/profiler/tests/gtest/LulTestInfrastructure.h index a48353071ffd..9faa7ca858d4 100644 --- a/tools/profiler/tests/gtest/LulTestInfrastructure.h +++ b/tools/profiler/tests/gtest/LulTestInfrastructure.h @@ -353,11 +353,12 @@ class Section { Section &L16(uint16_t), &L32(uint32_t), &L64(uint64_t), &B16(uint16_t), &B32(uint32_t), &B64(uint64_t), &D16(uint16_t), &D32(uint32_t), &D64(uint64_t); - Section &L8(const Label&label), &L16(const Label&label), - &L32(const Label&label), &L64(const Label&label), &B8(const Label&label), - &B16(const Label&label), &B32(const Label&label), &B64(const Label&label), - &D8(const Label&label), &D16(const Label&label), &D32(const Label&label), - &D64(const Label&label); + Section &L8(const Label& label), &L16(const Label& label), + &L32(const Label& label), &L64(const Label& label), + &B8(const Label& label), &B16(const Label& label), + &B32(const Label& label), &B64(const Label& label), + &D8(const Label& label), &D16(const Label& label), + &D32(const Label& label), &D64(const Label& label); // Append VALUE in a signed LEB128 (Little-Endian Base 128) form. // diff --git a/widget/cocoa/MediaHardwareKeysEventSourceMacMediaCenter.mm b/widget/cocoa/MediaHardwareKeysEventSourceMacMediaCenter.mm index a258c7900cd3..9637c11d81f7 100644 --- a/widget/cocoa/MediaHardwareKeysEventSourceMacMediaCenter.mm +++ b/widget/cocoa/MediaHardwareKeysEventSourceMacMediaCenter.mm @@ -168,5 +168,5 @@ void MediaHardwareKeysEventSourceMacMediaCenter::SetMediaMetadata( [MPNowPlayingInfoCenter defaultCenter].nowPlayingInfo = nowPlayingInfo; } -} -} +} // namespace widget +} // namespace mozilla diff --git a/widget/cocoa/nsMenuItemX.mm b/widget/cocoa/nsMenuItemX.mm index 3cbde81c62c6..175dad525c8f 100644 --- a/widget/cocoa/nsMenuItemX.mm +++ b/widget/cocoa/nsMenuItemX.mm @@ -23,8 +23,8 @@ using namespace mozilla; -using mozilla::dom::Event; using mozilla::dom::CallerType; +using mozilla::dom::Event; nsMenuItemX::nsMenuItemX(nsMenuX* aParent, const nsString& aLabel, EMenuItemType aItemType, nsMenuGroupOwnerX* aMenuGroupOwner, nsIContent* aNode) diff --git a/widget/uikit/nsWidgetFactory.mm b/widget/uikit/nsWidgetFactory.mm index bdf1beceeb05..7250d6ddad13 100644 --- a/widget/uikit/nsWidgetFactory.mm +++ b/widget/uikit/nsWidgetFactory.mm @@ -20,8 +20,8 @@ namespace mozilla { namespace widget { // This constructor should really be shared with all platforms. NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(GfxInfo, Init) -} -} +} // namespace widget +} // namespace mozilla NS_DEFINE_NAMED_CID(NS_APPSHELL_CID); NS_DEFINE_NAMED_CID(NS_SCREENMANAGER_CID); diff --git a/widget/windows/nsWindowDbg.h b/widget/windows/nsWindowDbg.h index e89541c11d53..672ec9756b60 100644 --- a/widget/windows/nsWindowDbg.h +++ b/widget/windows/nsWindowDbg.h @@ -13,17 +13,17 @@ #include "nsWindowDefs.h" // Enables debug output for popup rollup hooks -//#define POPUP_ROLLUP_DEBUG_OUTPUT +// #define POPUP_ROLLUP_DEBUG_OUTPUT // Enable window size and state debug output -//#define WINSTATE_DEBUG_OUTPUT +// #define WINSTATE_DEBUG_OUTPUT // nsIWidget defines a set of debug output statements // that are called in various places within the code. -//#define WIDGET_DEBUG_OUTPUT +// #define WIDGET_DEBUG_OUTPUT // Enable IS_VK_DOWN debug output -//#define DEBUG_VK +// #define DEBUG_VK namespace mozilla::widget { // Windows message debugging data diff --git a/xpcom/base/MacHelpers.mm b/xpcom/base/MacHelpers.mm index b0de5ddbfd3c..22d8ef61a498 100644 --- a/xpcom/base/MacHelpers.mm +++ b/xpcom/base/MacHelpers.mm @@ -29,4 +29,4 @@ nsresult GetSelectedCityInfo(nsAString& aCountryCode) { NS_OBJC_END_TRY_BLOCK_RETURN(NS_ERROR_FAILURE); } -} // namespace Mozilla +} // namespace mozilla diff --git a/xpcom/base/MacStringHelpers.h b/xpcom/base/MacStringHelpers.h index f3f67edd8427..c2f9ee82dc02 100644 --- a/xpcom/base/MacStringHelpers.h +++ b/xpcom/base/MacStringHelpers.h @@ -15,6 +15,6 @@ namespace mozilla { nsresult CopyCocoaStringToXPCOMString(NSString* aFrom, nsAString& aTo); -} // namespace Mozilla +} // namespace mozilla #endif diff --git a/xpcom/base/MacStringHelpers.mm b/xpcom/base/MacStringHelpers.mm index fcbc95bd438c..9bfbdd912e9d 100644 --- a/xpcom/base/MacStringHelpers.mm +++ b/xpcom/base/MacStringHelpers.mm @@ -31,4 +31,4 @@ nsresult CopyCocoaStringToXPCOMString(NSString* aFrom, nsAString& aTo) { NS_OBJC_END_TRY_BLOCK_RETURN(NS_ERROR_FAILURE); } -} // namespace Mozilla +} // namespace mozilla diff --git a/xpcom/base/nsDebug.h b/xpcom/base/nsDebug.h index aac7755fe414..349c297ea8bf 100644 --- a/xpcom/base/nsDebug.h +++ b/xpcom/base/nsDebug.h @@ -162,13 +162,13 @@ inline void MOZ_PretendNoReturn() MOZ_PRETEND_NORETURN_FOR_STATIC_ANALYSIS {} # ifdef XGILL_PLUGIN -# define STATIC_PRECONDITION(COND) __attribute__((precondition(# COND))) +# define STATIC_PRECONDITION(COND) __attribute__((precondition(#COND))) # define STATIC_PRECONDITION_ASSUME(COND) \ __attribute__((precondition_assume(#COND))) -# define STATIC_POSTCONDITION(COND) __attribute__((postcondition(# COND))) +# define STATIC_POSTCONDITION(COND) __attribute__((postcondition(#COND))) # define STATIC_POSTCONDITION_ASSUME(COND) \ __attribute__((postcondition_assume(#COND))) -# define STATIC_INVARIANT(COND) __attribute__((invariant(# COND))) +# define STATIC_INVARIANT(COND) __attribute__((invariant(#COND))) # define STATIC_INVARIANT_ASSUME(COND) \ __attribute__((invariant_assume(#COND))) diff --git a/xpcom/base/nsObjCExceptions.h b/xpcom/base/nsObjCExceptions.h index 80b9f4a61c33..e8c2059d8e59 100644 --- a/xpcom/base/nsObjCExceptions.h +++ b/xpcom/base/nsObjCExceptions.h @@ -24,7 +24,7 @@ namespace mozilla { // Called when an exception bubbles up to the native event loop. bool ShouldIgnoreObjCException(NSException* aException); -} +} // namespace mozilla // For wrapping blocks of Obj-C calls which are not expected to throw exception. // Causes a MOZ_CRASH if an Obj-C exception is encountered. diff --git a/xpcom/tests/TestStreamUtils.cpp b/xpcom/tests/TestStreamUtils.cpp index 1a24656617d4..9ba6d36aa3ac 100644 --- a/xpcom/tests/TestStreamUtils.cpp +++ b/xpcom/tests/TestStreamUtils.cpp @@ -39,7 +39,9 @@ static bool test_consume_stream() { typedef bool (*TestFunc)(); #define DECL_TEST(name) \ - { #name, name } + { \ +# name, name \ + } static const struct Test { const char* name; diff --git a/xpcom/tests/gtest/TestExpirationTracker.cpp b/xpcom/tests/gtest/TestExpirationTracker.cpp index de55d6f90731..4bc00a80aa52 100644 --- a/xpcom/tests/gtest/TestExpirationTracker.cpp +++ b/xpcom/tests/gtest/TestExpirationTracker.cpp @@ -172,7 +172,9 @@ static bool test_random8() { return test_random<8>(); } typedef bool (*TestFunc)(); #define DECL_TEST(name) \ - { #name, name } + { \ +# name, name \ + } static const struct Test { const char* name;