Skip to content
Snippets Groups Projects
  1. Oct 27, 2022
  2. Jun 06, 2022
  3. May 26, 2022
  4. May 13, 2022
  5. May 10, 2022
  6. May 03, 2022
  7. Apr 29, 2022
    • Gerald Squelart's avatar
      Bug 1763176 - Don't move to the next entry after streaming a counter, as it... · 8f081535
      Gerald Squelart authored
      Bug 1763176 - Don't move to the next entry after streaming a counter, as it would skip an immediately-adjacent counter - r=canaltinova
      
      If the sampler records more than one counter (e.g.: memory and per-process CPU), both counters could appear right next to each other in the buffer.
      But then the current streaming code goes something like this:
      1. Read entry
      2. If entry is a counter, go to the next entry (which should be a timestamp) and output the full counter.
      3. Go to the next entry.
      4: Return to step 1 (until there are no more entries).
      
      The problem is this unconditional 3rd step:
      If we've just read a counter at step 2, we're located at the entry *past* that counter's data, which could be the start of the next counter, that the 3rd step now effectively skips!
      
      Also:
      - After reading the time, we can do e.Next() to skip it before testing if it's too old, this may save one loop.
      - After reading the optional "number", we can also do e.Next() to skip it, which will save one loop as well.
      
      Differential Revision: https://phabricator.services.mozilla.com/D145056
      8f081535
    • Mike Hommey's avatar
      Bug 1766377 - Fix remaining sign-compare warnings in Windows builds.... · 028ad1b8
      Mike Hommey authored
      Bug 1766377 - Fix remaining sign-compare warnings in Windows builds. r=rkraesig,gsvelto,media-playback-reviewers,gfx-reviewers,bryce,sotaro
      
      browser/components/shell/WindowsUserChoice.cpp(233,23): error: comparison of integers of different signs: 'int' and 'const size_t' (aka 'const unsigned long long') [-Werror,-Wsign-compare]
          for (int j = 0; j < DWORDS_PER_BLOCK; ++j) {
                          ~ ^ ~~~~~~~~~~~~~~~~
      browser/components/shell/WindowsUserChoice.cpp(388,21): error: comparison of integers of different signs: 'int' and 'size_t' (aka 'unsigned long long') [-Werror,-Wsign-compare]
        for (int i = 0; i < ArrayLength(exts); ++i) {
                        ~ ^ ~~~~~~~~~~~~~~~~~
      browser/components/shell/nsWindowsShellService.cpp(1225,21): error: comparison of integers of different signs: 'int' and 'size_t' (aka 'unsigned long long') [-Werror,-Wsign-compare]
        for (int i = 0; i < ArrayLength(shortcutCSIDLs); ++i) {
                        ~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
      browser/components/shell/nsWindowsShellService.cpp(1492,21): error: comparison of integers of different signs: 'int' and 'size_t' (aka 'unsigned long long') [-Werror,-Wsign-compare]
        for (int i = 0; i < ArrayLength(folders); ++i) {
                        ~ ^ ~~~~~~~~~~~~~~~~~~~~
      dom/media/platforms/wmf/MFTDecoder.cpp(85,23): error: comparison of integers of different signs: 'int' and 'UINT32' (aka 'unsigned int') [-Werror,-Wsign-compare]
          for (int i = 1; i < actsNum; i++) {
                          ~ ^ ~~~~~~~
      gfx/2d/Factory.cpp(1276,21): error: comparison of integers of different signs: 'int' and 'uint32_t' (aka 'unsigned int') [-Werror,-Wsign-compare]
        for (int y = 0; y < height; y++) {
                        ~ ^ ~~~~~~
      gfx/layers/d3d11/CompositorD3D11.cpp(1096,36): error: comparison of integers of different signs: 'UINT' (aka 'unsigned int') and 'int' [-Werror,-Wsign-compare]
              swapDesc.BufferDesc.Height == mSize.height) ||
              ~~~~~~~~~~~~~~~~~~~~~~~~~~ ^  ~~~~~~~~~~~~
      gfx/layers/d3d11/CompositorD3D11.cpp(1095,35): error: comparison of integers of different signs: 'UINT' (aka 'unsigned int') and 'int' [-Werror,-Wsign-compare]
        if (((swapDesc.BufferDesc.Width == mSize.width &&
              ~~~~~~~~~~~~~~~~~~~~~~~~~ ^  ~~~~~~~~~~~
      gfx/layers/d3d11/TextureD3D11.cpp(1278,30): error: comparison of integers of different signs: 'UINT' (aka 'unsigned int') and 'int' [-Werror,-Wsign-compare]
                currentDesc.Height != mSize.height ||
                ~~~~~~~~~~~~~~~~~~ ^  ~~~~~~~~~~~~
      gfx/layers/d3d11/TextureD3D11.cpp(1277,29): error: comparison of integers of different signs: 'UINT' (aka 'unsigned int') and 'int' [-Werror,-Wsign-compare]
            if (currentDesc.Width != mSize.width ||
                ~~~~~~~~~~~~~~~~~ ^  ~~~~~~~~~~~
      gfx/layers/ipc/ContentCompositorBridgeParent.cpp(248,19): error: comparison of integers of different signs: 'const uint32_t' (aka 'const unsigned int') and 'int32_t' (aka 'int') [-Werror,-Wsign-compare]
        if (sequenceNum == status.sequenceNumber() && !dm->HasDeviceReset()) {
            ~~~~~~~~~~~ ^  ~~~~~~~~~~~~~~~~~~~~~~~
      gfx/thebes/D3D11Checks.cpp(129,21): error: comparison of integers of different signs: 'int' and 'unsigned int' [-Werror,-Wsign-compare]
          if (resultColor != 0xffffff00) {
              ~~~~~~~~~~~ ^  ~~~~~~~~~~
      gfx/thebes/D3D11Checks.cpp(154,23): error: comparison of integers of different signs: 'int' and 'unsigned long long' [-Werror,-Wsign-compare]
          for (int i = 0; i < PR_ARRAY_SIZE(checkModules); i += 1) {
                          ~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
      gfx/thebes/D3D11Checks.cpp(409,14): error: comparison of integers of different signs: 'int32_t' (aka 'int') and 'UINT' (aka 'unsigned int') [-Werror,-Wsign-compare]
        if (vendor != desc.VendorId) {
            ~~~~~~ ^  ~~~~~~~~~~~~~
      gfx/thebes/gfxDWriteFontList.cpp(1248,39): error: comparison of integers of different signs: 'unsigned int' and 'int' [-Werror,-Wsign-compare]
              addFamily(names[index], index != sysLocIndex);
                                      ~~~~~ ^  ~~~~~~~~~~~
      intl/lwbrk/nsUniscribeBreaker.cpp(121,21): error: comparison of integers of different signs: 'int' and 'uint32_t' (aka 'unsigned int') [-Werror,-Wsign-compare]
        for (int i = 0; i < aLength; ++i) {
                        ~ ^ ~~~~~~~
      intl/lwbrk/nsUniscribeBreaker.cpp(132,23): error: comparison of integers of different signs: 'int' and 'uint32_t' (aka 'unsigned int') [-Werror,-Wsign-compare]
          for (int i = 0; i < aLength; ++i) {
                          ~ ^ ~~~~~~~
      intl/lwbrk/nsUniscribeBreaker.cpp(138,23): error: comparison of integers of different signs: 'int' and 'uint32_t' (aka 'unsigned int') [-Werror,-Wsign-compare]
          for (int i = 0; i < aLength; ++i) {
                          ~ ^ ~~~~~~~
      mozglue/misc/PreXULSkeletonUI.cpp(319,26): error: comparison of integers of different signs: 'std::basic_string<char>::size_type' (aka 'unsigned long long') and 'int' [-Werror,-Wsign-compare]
          while (line.length() > whitespace &&
                 ~~~~~~~~~~~~~ ^ ~~~~~~~~~~
      mozglue/misc/PreXULSkeletonUI.cpp(1003,21): error: comparison of integers of different signs: 'int' and 'size_t' (aka 'unsigned long long') [-Werror,-Wsign-compare]
        for (int i = 1; i < noPlaceholderSpans.length(); i++) {
                        ~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
      mozglue/misc/PreXULSkeletonUI.cpp(1708,21): error: comparison of integers of different signs: 'int' and 'unsigned long long' [-Werror,-Wsign-compare]
        for (int i = 0; i < dataLen / (2 * sizeof(double)); i++) {
                        ~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      security/sandbox/chromium-shim/sandbox/win/permissionsService.cpp(40,16): error: comparison of integers of different signs: 'int' and 'const std::basic_string<wchar_t>::size_type' (aka 'const unsigned long long') [-Werror,-Wsign-compare]
        if (slashIdx != std::wstring::npos) {
            ~~~~~~~~ ^  ~~~~~~~~~~~~~~~~~~
      toolkit/components/aboutthirdparty/tests/gtest/TestAboutThirdParty.cpp(107,21): error: comparison of integers of different signs: 'int' and 'size_t' (aka 'unsigned long long') [-Werror,-Wsign-compare]
        for (int i = 0; i < ArrayLength(kDirectoriesUnsorted); ++i) {
                        ~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      toolkit/crashreporter/breakpad-client/windows/crash_generation/crash_generation_server.cc(957,23): error: comparison of integers of different signs: 'int' and 'const size_t' (aka 'const unsigned long long') [-Werror,-Wsign-compare]
          for (int i = 0; i < kExceptionAppMemoryRegions; i++) {
                          ~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~
      toolkit/crashreporter/client/crashreporter_win.cpp(373,21): error: comparison of integers of different signs: 'int' and 'unsigned long long' [-Werror,-Wsign-compare]
        for (int i = 0; i < sizeof(kDefaultAttachedBottom) / sizeof(UINT); i++) {
                        ~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      toolkit/crashreporter/client/crashreporter_win.cpp(671,21): error: comparison of integers of different signs: 'int' and 'unsigned long long' [-Werror,-Wsign-compare]
        for (int i = 0; i < sizeof(controls) / sizeof(controls[0]); i++) {
                        ~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      toolkit/crashreporter/client/crashreporter_win.cpp(1048,21): error: comparison of integers of different signs: 'int' and 'unsigned long long' [-Werror,-Wsign-compare]
        for (int i = 0; i < sizeof(kDefaultAttachedBottom) / sizeof(UINT); i++) {
                        ~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      toolkit/mozapps/defaultagent/SetDefaultBrowser.cpp(248,21): error: comparison of integers of different signs: 'int' and 'size_t' (aka 'unsigned long long') [-Werror,-Wsign-compare]
        for (int i = 0; i < mozilla::ArrayLength(associations); ++i) {
                        ~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      toolkit/system/windowsproxy/ProxyUtils.cpp(27,36): error: comparison of integers of different signs: 'const int' and 'nsTArray_base::size_type' (aka 'unsigned long long') [-Werror,-Wsign-compare]
                                   if (i < addr.Length()) {
                                       ~ ^ ~~~~~~~~~~~~~
      toolkit/xre/dllservices/mozglue/interceptor/Arm64.h(178,28): error: comparison of integers of different signs: 'int32_t' (aka 'int') and 'unsigned int' [-Werror,-Wsign-compare]
        if (signbits && signbits != 0xFE000000) {
                        ~~~~~~~~ ^  ~~~~~~~~~~
      obj-build/dist/include/gtest/gtest.h(1842,54): note: expanded from macro 'EXPECT_EQ'
        EXPECT_PRED_FORMAT2(::testing::internal::EqHelper::Compare, val1, val2)
                                                           ^
      obj-build/dist/include/gtest/gtest.h(1354,11): error: comparison of integers of different signs: 'const unsigned int' and 'const int' [-Werror,-Wsign-compare]
        if (lhs == rhs) {
            ~~~ ^  ~~~
      obj-build/dist/include/gtest/gtest.h(1373,12): note: in instantiation of function template specialization 'testing::internal::CmpHelperEQ<unsigned int, int>' requested here
          return CmpHelperEQ(lhs_expression, rhs_expression, lhs, rhs);
                 ^
      toolkit/xre/dllservices/tests/gtest/TestUntrustedModules.cpp(35,5): note: in instantiation of function template specialization 'testing::internal::EqHelper::Compare<unsigned int, int, nullptr>' requested here
          EXPECT_EQ(mCounters.Count(), N);
          ^
      obj-build/dist/include/gtest/gtest.h(1842,54): note: expanded from macro 'EXPECT_EQ'
        EXPECT_PRED_FORMAT2(::testing::internal::EqHelper::Compare, val1, val2)
                                                           ^
      toolkit/xre/dllservices/tests/gtest/TestUntrustedModules.cpp(210,28): note: in instantiation of function template specialization 'ModuleLoadCounter::Remains<1>' requested here
          EXPECT_TRUE(waitForOne.Remains({kTestModules[0]}, {0}));
                                 ^
      toolkit/xre/test/gtest/TestAssembleCommandLineWin.cpp(139,21): error: comparison of integers of different signs: 'int' and 'size_t' (aka 'unsigned long long') [-Werror,-Wsign-compare]
        for (int i = 0; i < ArrayLength(kExpectedArgsW); ++i) {
                        ~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
      toolkit/xre/test/gtest/TestAssembleCommandLineWin.cpp(151,21): error: comparison of integers of different signs: 'int' and 'size_t' (aka 'unsigned long long') [-Werror,-Wsign-compare]
        for (int i = 0; i < ArrayLength(kExpectedArgsW); ++i) {
                        ~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
      toolkit/xre/test/gtest/TestAssembleCommandLineWin.cpp(164,21): error: comparison of integers of different signs: 'int' and 'size_t' (aka 'unsigned long long') [-Werror,-Wsign-compare]
        for (int i = 0; i < ArrayLength(kExpectedArgsW); ++i) {
                        ~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
      obj-build/dist/include/gtest/gtest.h(1354,11): error: comparison of integers of different signs: 'const int' and 'const unsigned long long' [-Werror,-Wsign-compare]
        if (lhs == rhs) {
            ~~~ ^  ~~~
      obj-build/dist/include/gtest/gtest.h(1373,12): note: in instantiation of function template specialization 'testing::internal::CmpHelperEQ<int, unsigned long long>' requested here
          return CmpHelperEQ(lhs_expression, rhs_expression, lhs, rhs);
                 ^
      toolkit/xre/test/gtest/TestAssembleCommandLineWin.cpp(138,3): note: in instantiation of function template specialization 'testing::internal::EqHelper::Compare<int, unsigned long long, nullptr>' requested here
        EXPECT_EQ(len, ArrayLength(kExpectedArgsW));
        ^
      widget/windows/TSFTextStore.cpp(3455,28): error: comparison of integers of different signs: 'uint32_t' (aka 'unsigned int') and 'long' [-Werror,-Wsign-compare]
                range.mEndOffset == end - mComposition->StartOffset() &&
                ~~~~~~~~~~~~~~~~ ^  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      widget/windows/TSFTextStore.cpp(3454,30): error: comparison of integers of different signs: 'uint32_t' (aka 'unsigned int') and 'long' [-Werror,-Wsign-compare]
            if (range.mStartOffset == start - mComposition->StartOffset() &&
                ~~~~~~~~~~~~~~~~~~ ^  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      xpfe/appshell/AppWindow.cpp(1900,21): error: comparison of integers of different signs: 'int' and 'uint32_t' (aka 'unsigned int') [-Werror,-Wsign-compare]
        for (int i = 0; i < toolbarSprings->Length(); i++) {
                        ~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~
      
      Differential Revision: https://phabricator.services.mozilla.com/D144695
      028ad1b8
    • Norisz Fay's avatar
      Backed out 4 changesets (bug 1766377) for causing mochitest failures on... · 6e06e2da
      Norisz Fay authored
      Backed out 4 changesets (bug 1766377) for causing mochitest failures on HyperTextAccessible.cpp CLOSED TREE
      
      Backed out changeset 6335511477a4 (bug 1766377)
      Backed out changeset e8108d6fab9f (bug 1766377)
      Backed out changeset 80d16d55c490 (bug 1766377)
      Backed out changeset 1a6583d6e52e (bug 1766377)
      6e06e2da
    • Mike Hommey's avatar
      Bug 1766377 - Fix remaining sign-compare warnings in Windows builds.... · 9cd056be
      Mike Hommey authored
      Bug 1766377 - Fix remaining sign-compare warnings in Windows builds. r=rkraesig,gsvelto,media-playback-reviewers,gfx-reviewers,bryce,sotaro
      
      browser/components/shell/WindowsUserChoice.cpp(233,23): error: comparison of integers of different signs: 'int' and 'const size_t' (aka 'const unsigned long long') [-Werror,-Wsign-compare]
          for (int j = 0; j < DWORDS_PER_BLOCK; ++j) {
                          ~ ^ ~~~~~~~~~~~~~~~~
      browser/components/shell/WindowsUserChoice.cpp(388,21): error: comparison of integers of different signs: 'int' and 'size_t' (aka 'unsigned long long') [-Werror,-Wsign-compare]
        for (int i = 0; i < ArrayLength(exts); ++i) {
                        ~ ^ ~~~~~~~~~~~~~~~~~
      browser/components/shell/nsWindowsShellService.cpp(1225,21): error: comparison of integers of different signs: 'int' and 'size_t' (aka 'unsigned long long') [-Werror,-Wsign-compare]
        for (int i = 0; i < ArrayLength(shortcutCSIDLs); ++i) {
                        ~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
      browser/components/shell/nsWindowsShellService.cpp(1492,21): error: comparison of integers of different signs: 'int' and 'size_t' (aka 'unsigned long long') [-Werror,-Wsign-compare]
        for (int i = 0; i < ArrayLength(folders); ++i) {
                        ~ ^ ~~~~~~~~~~~~~~~~~~~~
      dom/media/platforms/wmf/MFTDecoder.cpp(85,23): error: comparison of integers of different signs: 'int' and 'UINT32' (aka 'unsigned int') [-Werror,-Wsign-compare]
          for (int i = 1; i < actsNum; i++) {
                          ~ ^ ~~~~~~~
      gfx/2d/Factory.cpp(1276,21): error: comparison of integers of different signs: 'int' and 'uint32_t' (aka 'unsigned int') [-Werror,-Wsign-compare]
        for (int y = 0; y < height; y++) {
                        ~ ^ ~~~~~~
      gfx/layers/d3d11/CompositorD3D11.cpp(1096,36): error: comparison of integers of different signs: 'UINT' (aka 'unsigned int') and 'int' [-Werror,-Wsign-compare]
              swapDesc.BufferDesc.Height == mSize.height) ||
              ~~~~~~~~~~~~~~~~~~~~~~~~~~ ^  ~~~~~~~~~~~~
      gfx/layers/d3d11/CompositorD3D11.cpp(1095,35): error: comparison of integers of different signs: 'UINT' (aka 'unsigned int') and 'int' [-Werror,-Wsign-compare]
        if (((swapDesc.BufferDesc.Width == mSize.width &&
              ~~~~~~~~~~~~~~~~~~~~~~~~~ ^  ~~~~~~~~~~~
      gfx/layers/d3d11/TextureD3D11.cpp(1278,30): error: comparison of integers of different signs: 'UINT' (aka 'unsigned int') and 'int' [-Werror,-Wsign-compare]
                currentDesc.Height != mSize.height ||
                ~~~~~~~~~~~~~~~~~~ ^  ~~~~~~~~~~~~
      gfx/layers/d3d11/TextureD3D11.cpp(1277,29): error: comparison of integers of different signs: 'UINT' (aka 'unsigned int') and 'int' [-Werror,-Wsign-compare]
            if (currentDesc.Width != mSize.width ||
                ~~~~~~~~~~~~~~~~~ ^  ~~~~~~~~~~~
      gfx/layers/ipc/ContentCompositorBridgeParent.cpp(248,19): error: comparison of integers of different signs: 'const uint32_t' (aka 'const unsigned int') and 'int32_t' (aka 'int') [-Werror,-Wsign-compare]
        if (sequenceNum == status.sequenceNumber() && !dm->HasDeviceReset()) {
            ~~~~~~~~~~~ ^  ~~~~~~~~~~~~~~~~~~~~~~~
      gfx/thebes/D3D11Checks.cpp(129,21): error: comparison of integers of different signs: 'int' and 'unsigned int' [-Werror,-Wsign-compare]
          if (resultColor != 0xffffff00) {
              ~~~~~~~~~~~ ^  ~~~~~~~~~~
      gfx/thebes/D3D11Checks.cpp(154,23): error: comparison of integers of different signs: 'int' and 'unsigned long long' [-Werror,-Wsign-compare]
          for (int i = 0; i < PR_ARRAY_SIZE(checkModules); i += 1) {
                          ~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
      gfx/thebes/D3D11Checks.cpp(409,14): error: comparison of integers of different signs: 'int32_t' (aka 'int') and 'UINT' (aka 'unsigned int') [-Werror,-Wsign-compare]
        if (vendor != desc.VendorId) {
            ~~~~~~ ^  ~~~~~~~~~~~~~
      gfx/thebes/gfxDWriteFontList.cpp(1248,39): error: comparison of integers of different signs: 'unsigned int' and 'int' [-Werror,-Wsign-compare]
              addFamily(names[index], index != sysLocIndex);
                                      ~~~~~ ^  ~~~~~~~~~~~
      intl/lwbrk/nsUniscribeBreaker.cpp(121,21): error: comparison of integers of different signs: 'int' and 'uint32_t' (aka 'unsigned int') [-Werror,-Wsign-compare]
        for (int i = 0; i < aLength; ++i) {
                        ~ ^ ~~~~~~~
      intl/lwbrk/nsUniscribeBreaker.cpp(132,23): error: comparison of integers of different signs: 'int' and 'uint32_t' (aka 'unsigned int') [-Werror,-Wsign-compare]
          for (int i = 0; i < aLength; ++i) {
                          ~ ^ ~~~~~~~
      intl/lwbrk/nsUniscribeBreaker.cpp(138,23): error: comparison of integers of different signs: 'int' and 'uint32_t' (aka 'unsigned int') [-Werror,-Wsign-compare]
          for (int i = 0; i < aLength; ++i) {
                          ~ ^ ~~~~~~~
      mozglue/misc/PreXULSkeletonUI.cpp(319,26): error: comparison of integers of different signs: 'std::basic_string<char>::size_type' (aka 'unsigned long long') and 'int' [-Werror,-Wsign-compare]
          while (line.length() > whitespace &&
                 ~~~~~~~~~~~~~ ^ ~~~~~~~~~~
      mozglue/misc/PreXULSkeletonUI.cpp(1003,21): error: comparison of integers of different signs: 'int' and 'size_t' (aka 'unsigned long long') [-Werror,-Wsign-compare]
        for (int i = 1; i < noPlaceholderSpans.length(); i++) {
                        ~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
      mozglue/misc/PreXULSkeletonUI.cpp(1708,21): error: comparison of integers of different signs: 'int' and 'unsigned long long' [-Werror,-Wsign-compare]
        for (int i = 0; i < dataLen / (2 * sizeof(double)); i++) {
                        ~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      security/sandbox/chromium-shim/sandbox/win/permissionsService.cpp(40,16): error: comparison of integers of different signs: 'int' and 'const std::basic_string<wchar_t>::size_type' (aka 'const unsigned long long') [-Werror,-Wsign-compare]
        if (slashIdx != std::wstring::npos) {
            ~~~~~~~~ ^  ~~~~~~~~~~~~~~~~~~
      toolkit/components/aboutthirdparty/tests/gtest/TestAboutThirdParty.cpp(107,21): error: comparison of integers of different signs: 'int' and 'size_t' (aka 'unsigned long long') [-Werror,-Wsign-compare]
        for (int i = 0; i < ArrayLength(kDirectoriesUnsorted); ++i) {
                        ~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      toolkit/crashreporter/breakpad-client/windows/crash_generation/crash_generation_server.cc(957,23): error: comparison of integers of different signs: 'int' and 'const size_t' (aka 'const unsigned long long') [-Werror,-Wsign-compare]
          for (int i = 0; i < kExceptionAppMemoryRegions; i++) {
                          ~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~
      toolkit/crashreporter/client/crashreporter_win.cpp(373,21): error: comparison of integers of different signs: 'int' and 'unsigned long long' [-Werror,-Wsign-compare]
        for (int i = 0; i < sizeof(kDefaultAttachedBottom) / sizeof(UINT); i++) {
                        ~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      toolkit/crashreporter/client/crashreporter_win.cpp(671,21): error: comparison of integers of different signs: 'int' and 'unsigned long long' [-Werror,-Wsign-compare]
        for (int i = 0; i < sizeof(controls) / sizeof(controls[0]); i++) {
                        ~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      toolkit/crashreporter/client/crashreporter_win.cpp(1048,21): error: comparison of integers of different signs: 'int' and 'unsigned long long' [-Werror,-Wsign-compare]
        for (int i = 0; i < sizeof(kDefaultAttachedBottom) / sizeof(UINT); i++) {
                        ~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      toolkit/mozapps/defaultagent/SetDefaultBrowser.cpp(248,21): error: comparison of integers of different signs: 'int' and 'size_t' (aka 'unsigned long long') [-Werror,-Wsign-compare]
        for (int i = 0; i < mozilla::ArrayLength(associations); ++i) {
                        ~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      toolkit/system/windowsproxy/ProxyUtils.cpp(27,36): error: comparison of integers of different signs: 'const int' and 'nsTArray_base::size_type' (aka 'unsigned long long') [-Werror,-Wsign-compare]
                                   if (i < addr.Length()) {
                                       ~ ^ ~~~~~~~~~~~~~
      toolkit/xre/dllservices/mozglue/interceptor/Arm64.h(178,28): error: comparison of integers of different signs: 'int32_t' (aka 'int') and 'unsigned int' [-Werror,-Wsign-compare]
        if (signbits && signbits != 0xFE000000) {
                        ~~~~~~~~ ^  ~~~~~~~~~~
      obj-build/dist/include/gtest/gtest.h(1842,54): note: expanded from macro 'EXPECT_EQ'
        EXPECT_PRED_FORMAT2(::testing::internal::EqHelper::Compare, val1, val2)
                                                           ^
      obj-build/dist/include/gtest/gtest.h(1354,11): error: comparison of integers of different signs: 'const unsigned int' and 'const int' [-Werror,-Wsign-compare]
        if (lhs == rhs) {
            ~~~ ^  ~~~
      obj-build/dist/include/gtest/gtest.h(1373,12): note: in instantiation of function template specialization 'testing::internal::CmpHelperEQ<unsigned int, int>' requested here
          return CmpHelperEQ(lhs_expression, rhs_expression, lhs, rhs);
                 ^
      toolkit/xre/dllservices/tests/gtest/TestUntrustedModules.cpp(35,5): note: in instantiation of function template specialization 'testing::internal::EqHelper::Compare<unsigned int, int, nullptr>' requested here
          EXPECT_EQ(mCounters.Count(), N);
          ^
      obj-build/dist/include/gtest/gtest.h(1842,54): note: expanded from macro 'EXPECT_EQ'
        EXPECT_PRED_FORMAT2(::testing::internal::EqHelper::Compare, val1, val2)
                                                           ^
      toolkit/xre/dllservices/tests/gtest/TestUntrustedModules.cpp(210,28): note: in instantiation of function template specialization 'ModuleLoadCounter::Remains<1>' requested here
          EXPECT_TRUE(waitForOne.Remains({kTestModules[0]}, {0}));
                                 ^
      toolkit/xre/test/gtest/TestAssembleCommandLineWin.cpp(139,21): error: comparison of integers of different signs: 'int' and 'size_t' (aka 'unsigned long long') [-Werror,-Wsign-compare]
        for (int i = 0; i < ArrayLength(kExpectedArgsW); ++i) {
                        ~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
      toolkit/xre/test/gtest/TestAssembleCommandLineWin.cpp(151,21): error: comparison of integers of different signs: 'int' and 'size_t' (aka 'unsigned long long') [-Werror,-Wsign-compare]
        for (int i = 0; i < ArrayLength(kExpectedArgsW); ++i) {
                        ~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
      toolkit/xre/test/gtest/TestAssembleCommandLineWin.cpp(164,21): error: comparison of integers of different signs: 'int' and 'size_t' (aka 'unsigned long long') [-Werror,-Wsign-compare]
        for (int i = 0; i < ArrayLength(kExpectedArgsW); ++i) {
                        ~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
      obj-build/dist/include/gtest/gtest.h(1354,11): error: comparison of integers of different signs: 'const int' and 'const unsigned long long' [-Werror,-Wsign-compare]
        if (lhs == rhs) {
            ~~~ ^  ~~~
      obj-build/dist/include/gtest/gtest.h(1373,12): note: in instantiation of function template specialization 'testing::internal::CmpHelperEQ<int, unsigned long long>' requested here
          return CmpHelperEQ(lhs_expression, rhs_expression, lhs, rhs);
                 ^
      toolkit/xre/test/gtest/TestAssembleCommandLineWin.cpp(138,3): note: in instantiation of function template specialization 'testing::internal::EqHelper::Compare<int, unsigned long long, nullptr>' requested here
        EXPECT_EQ(len, ArrayLength(kExpectedArgsW));
        ^
      widget/windows/TSFTextStore.cpp(3455,28): error: comparison of integers of different signs: 'uint32_t' (aka 'unsigned int') and 'long' [-Werror,-Wsign-compare]
                range.mEndOffset == end - mComposition->StartOffset() &&
                ~~~~~~~~~~~~~~~~ ^  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      widget/windows/TSFTextStore.cpp(3454,30): error: comparison of integers of different signs: 'uint32_t' (aka 'unsigned int') and 'long' [-Werror,-Wsign-compare]
            if (range.mStartOffset == start - mComposition->StartOffset() &&
                ~~~~~~~~~~~~~~~~~~ ^  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      xpfe/appshell/AppWindow.cpp(1900,21): error: comparison of integers of different signs: 'int' and 'uint32_t' (aka 'unsigned int') [-Werror,-Wsign-compare]
        for (int i = 0; i < toolbarSprings->Length(); i++) {
                        ~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~
      
      Differential Revision: https://phabricator.services.mozilla.com/D144695
      9cd056be
  8. Apr 27, 2022
  9. Apr 26, 2022
    • Mike Hommey's avatar
      Bug 1766359 - Fix unreachable-code-return warnings in Windows builds.... · 3da3b13f
      Mike Hommey authored
      Bug 1766359 - Fix unreachable-code-return warnings in Windows builds. r=emilio,mhowell,nika,rkraesig
      
      dom/system/PathUtils.cpp(77,10): error: 'return' will never be executed [-Werror,-Wunreachable-code-return]
        return false;
               ^~~~~
      ipc/chromium/src/chrome/common/ipc_channel_win.cc(479,10): error: 'return' will never be executed [-Werror,-Wunreachable-code-return]
        return true;
               ^~~~
      mozglue/misc/PreXULSkeletonUI.cpp(1263,10): error: 'return' will never be executed [-Werror,-Wunreachable-code-return]
        return 0;
               ^
      mozglue/tests/TestPEExportSection.cpp(348,12): error: 'return' will never be executed [-Werror,-Wunreachable-code-return]
          return 0;
                 ^
      security/manager/ssl/OSReauthenticator.cpp(428,10): error: 'return' will never be executed [-Werror,-Wunreachable-code-return]
        return NS_OK;
               ^~~~~
      toolkit/components/maintenanceservice/maintenanceservice.cpp(214,10): error: 'return' will never be executed [-Werror,-Wunreachable-code-return]
        return 0;
               ^
      widget/windows/WindowsUIUtils.cpp(383,10): error: 'return' will never be executed [-Werror,-Wunreachable-code-return]
        return false;
               ^~~~~
      
      Differential Revision: https://phabricator.services.mozilla.com/D144661
      3da3b13f
    • Mike Hommey's avatar
  10. Apr 22, 2022
  11. Apr 21, 2022
  12. Apr 20, 2022
  13. Apr 19, 2022
  14. Apr 14, 2022
  15. Apr 13, 2022
  16. Apr 06, 2022
  17. Mar 29, 2022
  18. Mar 28, 2022
  19. Mar 24, 2022
  20. Mar 23, 2022
  21. Mar 22, 2022
  22. Mar 16, 2022
Loading