Skip to content

Commit

Permalink
Merge pull request #3 from turtlecoin/master
Browse files Browse the repository at this point in the history
Merging from upstream
  • Loading branch information
nnamon authored Jan 30, 2018
2 parents 7dec72d + 3d5ab92 commit df303ba
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 10 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
if you are unable call `cmake` from the terminal after installing.
- Install the [boost](http://www.boost.org/) libraries. Either compile boost
manually or run `brew install boost`.
- Install XCode and Developer Tools.
- Install Xcode and Developer Tools.

##### Building

Expand Down
2 changes: 1 addition & 1 deletion external/gtest/test/gtest_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -3790,7 +3790,7 @@ TEST(AssertionTest, NamedEnum) {
EXPECT_NONFATAL_FAILURE(EXPECT_EQ(kE1, kE2), "Actual: 1");
}

// The version of gcc used in XCode 2.2 has a bug and doesn't allow
// The version of gcc used in Xcode 2.2 has a bug and doesn't allow
// anonymous enums in assertions. Therefore the following test is not
// done on Mac.
// Sun Studio and HP aCC also reject this code.
Expand Down
2 changes: 1 addition & 1 deletion external/rocksdb/INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ your make commands, like this: `PORTABLE=1 make static_lib`

* **OS X**:
* Install latest C++ compiler that supports C++ 11:
* Update XCode: run `xcode-select --install` (or install it from XCode App's settting).
* Update Xcode: run `xcode-select --install` (or install it from Xcode settings).
* Install via [homebrew](http://brew.sh/).
* If you're first time developer in MacOS, you still need to run: `xcode-select --install` in your command line.
* run `brew tap homebrew/versions; brew install gcc47 --use-llvm` to install gcc 4.7 (or higher).
Expand Down
14 changes: 7 additions & 7 deletions src/Common/Base58.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -97,13 +97,13 @@ namespace Tools
uint64_t res = 0;
switch (9 - size)
{
case 1: res |= *data++;
case 2: res <<= 8; res |= *data++;
case 3: res <<= 8; res |= *data++;
case 4: res <<= 8; res |= *data++;
case 5: res <<= 8; res |= *data++;
case 6: res <<= 8; res |= *data++;
case 7: res <<= 8; res |= *data++;
case 1: res |= *data++; /* fallthrough */
case 2: res <<= 8; res |= *data++; /* fallthrough */
case 3: res <<= 8; res |= *data++; /* fallthrough */
case 4: res <<= 8; res |= *data++; /* fallthrough */
case 5: res <<= 8; res |= *data++; /* fallthrough */
case 6: res <<= 8; res |= *data++; /* fallthrough */
case 7: res <<= 8; res |= *data++; /* fallthrough */
case 8: res <<= 8; res |= *data; break;
default: assert(false);
}
Expand Down
6 changes: 6 additions & 0 deletions src/Platform/Linux/System/TcpConnection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,10 @@ size_t TcpConnection::read(uint8_t* data, size_t size) {
std::string message;
ssize_t transferred = ::recv(connection, (void *)data, size, 0);
if (transferred == -1) {
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wlogical-op"
if (errno != EAGAIN && errno != EWOULDBLOCK) {
#pragma GCC diagnostic pop
message = "recv failed, " + lastErrorMessage();
} else {
epoll_event connectionEvent;
Expand Down Expand Up @@ -177,7 +180,10 @@ std::size_t TcpConnection::write(const uint8_t* data, size_t size) {

ssize_t transferred = ::send(connection, (void *)data, size, MSG_NOSIGNAL);
if (transferred == -1) {
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wlogical-op"
if (errno != EAGAIN && errno != EWOULDBLOCK) {
#pragma GCC diagnostic pop
message = "send failed, " + lastErrorMessage();
} else {
epoll_event connectionEvent;
Expand Down
3 changes: 3 additions & 0 deletions src/Platform/Linux/System/Timer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,10 @@ void Timer::sleep(std::chrono::nanoseconds duration) {
if (!timerContext->interrupted) {
uint64_t value = 0;
if(::read(timer, &value, sizeof value) == -1 ){
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wlogical-op"
if(errno == EAGAIN || errno == EWOULDBLOCK) {
#pragma GCC diagnostic pop
timerContext->interrupted = true;
dispatcher->pushContext(timerContext->context);
} else {
Expand Down

0 comments on commit df303ba

Please sign in to comment.