Skip to content

Commit 45f967f

Browse files
committed
Remove clang warnings and reactivate clang compilation in travis
1 parent ab7ae38 commit 45f967f

9 files changed

Lines changed: 29 additions & 33 deletions

.travis.yml

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -30,24 +30,24 @@ matrix:
3030
packages:
3131
- g++-6
3232
env: COMPILER=g++-6
33-
# - compiler: clang
34-
# addons:
35-
# apt:
36-
# sources:
37-
# - ubuntu-toolchain-r-test
38-
# - llvm-toolchain-precise-3.6
39-
# packages:
40-
# - clang-3.6
41-
# env: COMPILER=clang++-3.6
42-
# - compiler: clang
43-
# addons:
44-
# apt:
45-
# sources:
46-
# - ubuntu-toolchain-r-test
47-
# - llvm-toolchain-precise-3.7
48-
# packages:
49-
# - clang-3.7
50-
# env: COMPILER=clang++-3.7
33+
- compiler: clang
34+
addons:
35+
apt:
36+
sources:
37+
- ubuntu-toolchain-r-test
38+
- llvm-toolchain-precise-3.7
39+
packages:
40+
- clang-3.7
41+
env: COMPILER=clang++-3.7
42+
- compiler: clang
43+
addons:
44+
apt:
45+
sources:
46+
- ubuntu-toolchain-r-test
47+
- llvm-toolchain-precise-3.8
48+
packages:
49+
- clang-3.8
50+
env: COMPILER=clang++-3.8
5151

5252
before_install:
5353
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then

Disruptor.PerfTests/OneToOneRawThroughputTest.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,12 @@ namespace PerfTests
2525
const auto expectedCount = m_myRunnable->sequence->value() + m_iterations;
2626
m_myRunnable->reset(latch, expectedCount);
2727

28-
auto consumerTask = m_taskScheduler->scheduleAndStart(std::move(std::packaged_task< void() >([this] { m_myRunnable->run(); })));
28+
auto consumerTask = m_taskScheduler->scheduleAndStart(std::packaged_task< void() >([this] { m_myRunnable->run(); }));
2929
stopwatch.start();
3030

3131
auto sequencer = m_sequencer;
3232

33-
auto producerTask = m_taskScheduler->scheduleAndStart(std::move(std::packaged_task< void() >([this, sequencer, latch]
33+
auto producerTask = m_taskScheduler->scheduleAndStart(std::packaged_task< void() >([this, sequencer, latch]
3434
{
3535
auto& s = *sequencer;
3636
for (std::int64_t i = 0; i < m_iterations; ++i)
@@ -40,7 +40,7 @@ namespace PerfTests
4040
}
4141

4242
latch->waitOne();
43-
})));
43+
}));
4444

4545
producerTask.wait();
4646
stopwatch.stop();

Disruptor.PerfTests/OneToThreeSequencedThroughputTest.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ namespace PerfTests
5858
for (auto i = 0; i < m_numEventProcessors; ++i)
5959
{
6060
m_handlers[i]->reset(latch, m_batchEventProcessors[i]->sequence()->value() + m_iterations);
61-
processorTasks.push_back(std::move(m_executor->execute([this, i] { m_batchEventProcessors[i]->run(); })));
61+
processorTasks.push_back(m_executor->execute([this, i] { m_batchEventProcessors[i]->run(); }));
6262
}
6363

6464
auto& rb = *m_ringBuffer;

Disruptor.PerfTests/PingPongSequencedLatencyTest.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,6 @@ namespace PerfTests
7979
{
8080
auto t1 = Stopwatch::getTimestamp();
8181

82-
auto nano = std::chrono::nanoseconds(t1 - m_t0);
8382
m_latencyRecorder->record(LatencyTestSession::convertStopwatchTicksToNano((double)(t1 - m_t0)));
8483

8584
if (data.value < m_maxEvents)

Disruptor.PerfTests/ThreeToOneSequencedThroughputTest.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,9 @@ namespace PerfTests
3838
for (auto i = 0; i < m_numPublishers; ++i)
3939
{
4040
auto index = i;
41-
futures[i] = m_scheduler->scheduleAndStart(std::move(std::packaged_task< void() >([this, index] { m_valuePublishers[index](m_cyclicBarrier, m_ringBuffer, m_iterations); })));
41+
futures[i] = m_scheduler->scheduleAndStart(std::packaged_task< void() >([this, index] { m_valuePublishers[index](m_cyclicBarrier, m_ringBuffer, m_iterations); }));
4242
}
43-
auto processorTask = m_scheduler->scheduleAndStart(std::move(std::packaged_task< void() >([this] { m_batchEventProcessor->run(); })));
43+
auto processorTask = m_scheduler->scheduleAndStart(std::packaged_task< void() >([this] { m_batchEventProcessor->run(); }));
4444

4545
stopwatch.start();
4646
m_cyclicBarrier->signal();

Disruptor.PerfTests/TwoToTwoWorkProcessorThroughputTest.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ namespace PerfTests
3535
for (auto i = 0; i < m_numPublishers; ++i)
3636
{
3737
auto index = i;
38-
futures[i] = std::move(std::async(std::launch::async, [this, index] { m_valuePublishers[index]->run(); }));
38+
futures[i] = std::async(std::launch::async, [this, index] { m_valuePublishers[index]->run(); });
3939
}
4040

4141
for (auto&& processor : m_workProcessors)

Disruptor.Tests/EventPublisherTests.cpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,7 @@ namespace Tests
1515
{
1616
struct Translator : public IEventTranslator< LongEvent >
1717
{
18-
explicit Translator(EventPublisherFixture& fixture)
19-
: m_fixture(fixture)
18+
explicit Translator(EventPublisherFixture&)
2019
{
2120
}
2221

@@ -25,8 +24,6 @@ namespace Tests
2524
eventData.value = sequence + 29;
2625
}
2726

28-
private:
29-
EventPublisherFixture& m_fixture;
3027
};
3128

3229
EventPublisherFixture()

Disruptor.Tests/StubExecutor.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ namespace Tests
1616
if (!m_ignoreExecutions)
1717
{
1818
std::packaged_task< void() > task(command);
19-
result = std::move(task.get_future());
19+
result = task.get_future();
2020

2121
std::lock_guard< decltype(m_mutex) > lock(m_mutex);
22-
m_threads.push_back(std::move(boost::thread(std::move(task))));
22+
m_threads.push_back(boost::thread(std::move(task)));
2323
}
2424

2525
return result;

Disruptor/RingBuffer.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -539,7 +539,7 @@ namespace Disruptor
539539
if (batchStartsAt + batchSize > argumentCount)
540540
{
541541
DISRUPTOR_THROW_ARGUMENT_EXCEPTION("A batchSize of: " << batchSize <<
542-
" with batchStartsAt of: " + batchStartsAt <<
542+
" with batchStartsAt of: " << batchStartsAt <<
543543
" will overrun the available number of arguments: " << (argumentCount - batchStartsAt));
544544
}
545545
}

0 commit comments

Comments
 (0)