Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(65)

Issue 2013893003: fix signed warning errors in unittests (Closed)

Created:
4 years, 7 months ago by vapier
Modified:
4 years, 7 months ago
Reviewers:
Ted Mielczarek, ted
CC:
google-breakpad-dev_googlegroups.com
Base URL:
https://chromium.googlesource.com/breakpad/breakpad.git@master
Target Ref:
refs/heads/master
Visibility:
Public.

Description

fix signed warning errors in unittests A bunch of gtest assert statements fail due to signed warnings as unadorned constants are treated as signed integers. Mark them all unsigned to avoid that. One example (focus on the "[with ...]" blocks that show the types): In file included from src/breakpad_googletest_includes.h:33:0, from src/common/memory_unittest.cc:30: src/testing/gtest/include/gtest/gtest.h: In instantiation of 'testing::AssertionResult testing::internal::CmpHelperEQ(const char*, const char*, const T1&, const T2&) [with T1 = int; T2 = long unsigned int]': src/testing/gtest/include/gtest/gtest.h:1524:23: required from 'static testing::AssertionResult testing::internal::EqHelper<true>::Compare(const char*, const char*, const T1&, const T2&, typename testing::internal::EnableIf<(! testing::internal::is_pointer<T2>::value)>::type*) [with T1 = int; T2 = long unsigned int; typename testing::internal::EnableIf<(! testing::internal::is_pointer<T2>::value)>::type = void]' src/common/memory_unittest.cc:41:246: required from here src/testing/gtest/include/gtest/gtest.h:1448:16: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare] if (expected == actual) { ^ cc1plus: some warnings being treated as errors Makefile:5180: recipe for target 'src/common/src_client_linux_linux_client_unittest_shlib-memory_unittest.o' failed make[2]: *** [src/common/src_client_linux_linux_client_unittest_shlib-memory_unittest.o] Error 1 R=ted.mielczarek@gmail.com Committed: https://chromium.googlesource.com/breakpad/breakpad/+/bad9e55ea52abd1bb759b800d85aa8952e315af1

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+13 lines, -13 lines) Patch
M src/common/memory_unittest.cc View 6 chunks +12 lines, -12 lines 0 comments Download
M src/processor/minidump_processor_unittest.cc View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 10 (4 generated)
vapier
bouncing to you Ted as the memory_unittest.cc ones seem to come from the recent https://codereview.chromium.org/1688743002
4 years, 7 months ago (2016-05-25 18:49:05 UTC) #2
Ted Mielczarek
LGTM Should we fix the Travis build to match the Chromium build configuration? Is this ...
4 years, 7 months ago (2016-05-26 10:17:34 UTC) #5
vapier
Committed patchset #1 (id:1) manually as bad9e55ea52abd1bb759b800d85aa8952e315af1 (presubmit successful).
4 years, 7 months ago (2016-05-26 14:09:52 UTC) #7
vapier
i was building with gcc i don't think Chromium configs will help here -- they ...
4 years, 7 months ago (2016-05-26 14:10:31 UTC) #8
Ted Mielczarek
On 2016/05/26 14:10:31, vapier wrote: > i was building with gcc > > i don't ...
4 years, 7 months ago (2016-05-26 15:49:47 UTC) #9
vapier
4 years, 7 months ago (2016-05-26 16:26:16 UTC) #10
Message was sent while issue was closed.
perhaps.  the build errors i'm hitting aren't under Chromium ... these are on my
desktop building breakpad directly.  i'm using gcc-5.3 atm.

Powered by Google App Engine
This is Rietveld 408576698