forked from lix-project/lix
Fix gcc warning -Wsign-compare
Add the compile flag '-Wsign-compare' and adapt the code to fix all
cases of this warning.
Change-Id: I26b08fa5a03e4ac294daf697d32cf9140d84350d
This commit is contained in:
parent
ed9b7f4f84
commit
1224476def
|
@ -485,6 +485,7 @@ add_project_arguments(
|
|||
# TODO(Qyriad): Yes this is how the autoconf+Make system did it.
|
||||
# It would be nice for our headers to be idempotent instead.
|
||||
'-include', 'config.h',
|
||||
'-Wsign-compare',
|
||||
'-Wno-deprecated-declarations',
|
||||
'-Wimplicit-fallthrough',
|
||||
'-Werror=switch',
|
||||
|
|
|
@ -247,7 +247,7 @@ Worker::Results Worker::run(std::function<Targets (GoalFactory &)> req)
|
|||
.exclusiveJoin(std::move(onInterrupt.promise));
|
||||
|
||||
// TODO GC interface?
|
||||
if (auto localStore = dynamic_cast<LocalStore *>(&store); localStore && settings.minFree != 0) {
|
||||
if (auto localStore = dynamic_cast<LocalStore *>(&store); localStore && settings.minFree != 0u) {
|
||||
// Periodically wake up to see if we need to run the garbage collector.
|
||||
promise = promise.exclusiveJoin(boopGC(*localStore));
|
||||
}
|
||||
|
|
|
@ -147,7 +147,7 @@ TEST_P(PerTypeNonNullCompressionTest, truncatedValidInput)
|
|||
/* n.b. This also tests zero-length input, which is also invalid.
|
||||
* As of the writing of this comment, it returns empty output, but is
|
||||
* allowed to throw a compression error instead. */
|
||||
for (int i = 0; i < compressed.length(); ++i) {
|
||||
for (int i = 0; i < (int) compressed.length(); ++i) {
|
||||
auto newCompressed = compressed.substr(compressed.length() - i);
|
||||
try {
|
||||
decompress(method, newCompressed);
|
||||
|
|
Loading…
Reference in a new issue