Skip to content

Commit

Permalink
fix for clang 3.4
Browse files Browse the repository at this point in the history
  • Loading branch information
chenshuo committed Mar 8, 2014
1 parent c53f0ff commit 4f7aaf3
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 17 deletions.
14 changes: 3 additions & 11 deletions clang.diff
@@ -1,15 +1,16 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index a3066c5..9728303 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -15,6 +15,7 @@
@@ -16,6 +16,7 @@
-Wextra
-Werror
-Wconversion
+ -Wno-sign-conversion
-Wno-unused-parameter
-Wold-style-cast
-Woverloaded-virtual
@@ -24,16 +25,15 @@
@@ -25,16 +26,15 @@
-march=native
# -MMD
# -std=c++0x
Expand All @@ -28,12 +29,3 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt
set(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin)
set(LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR}/lib)

@@ -55,6 +55,8 @@
endif()

include_directories(${Boost_INCLUDE_DIRS})
+include_directories(/usr/lib/gcc/x86_64-linux-gnu/4.4/include/)
+include_directories(/usr/lib/gcc/x86_64-linux-gnu/4.4/include-fixed/)

include_directories(${PROJECT_SOURCE_DIR})

2 changes: 1 addition & 1 deletion examples/multiplexer/demux.cc
Expand Up @@ -17,7 +17,7 @@ using namespace muduo::net;

typedef boost::shared_ptr<TcpClient> TcpClientPtr;

const int kMaxConns = 1;
// const int kMaxConns = 1;
const size_t kMaxPacketLen = 255;
const size_t kHeaderLen = 3;

Expand Down
2 changes: 1 addition & 1 deletion examples/sudoku/sudoku.cc
Expand Up @@ -20,7 +20,7 @@ struct Node
};

const int kMaxNodes = 1 + 81*4 + 9*9*9*4;
const int kMaxColumns = 400;
// const int kMaxColumns = 400;
const int kRow = 100, kCol = 200, kBox = 300;

class SudokuSolver
Expand Down
1 change: 1 addition & 0 deletions muduo/base/tests/BlockingQueue_test.cc
Expand Up @@ -6,6 +6,7 @@
#include <boost/ptr_container/ptr_vector.hpp>
#include <string>
#include <stdio.h>
#include <unistd.h>

class Test
{
Expand Down
1 change: 1 addition & 0 deletions muduo/base/tests/SingletonThreadLocal_test.cc
Expand Up @@ -6,6 +6,7 @@
#include <boost/bind.hpp>
#include <boost/noncopyable.hpp>
#include <stdio.h>
#include <unistd.h>

class Test : boost::noncopyable
{
Expand Down
1 change: 1 addition & 0 deletions muduo/base/tests/Thread_test.cc
Expand Up @@ -4,6 +4,7 @@
#include <string>
#include <boost/bind.hpp>
#include <stdio.h>
#include <unistd.h>

void mysleep(int seconds)
{
Expand Down
8 changes: 4 additions & 4 deletions muduo/net/protobuf/ProtobufCodecLite.h
Expand Up @@ -88,10 +88,10 @@ class ProtobufCodecLite : boost::noncopyable
ErrorCode)> ErrorCallback;

ProtobufCodecLite(const ::google::protobuf::Message* prototype,
StringPiece tag,
const ProtobufMessageCallback& messageCb,
const RawMessageCallback& rawCb = RawMessageCallback(),
const ErrorCallback& errorCb = defaultErrorCallback)
StringPiece tag,
const ProtobufMessageCallback& messageCb,
const RawMessageCallback& rawCb = RawMessageCallback(),
const ErrorCallback& errorCb = defaultErrorCallback)
: prototype_(prototype),
tag_(tag.as_string()),
messageCallback_(messageCb),
Expand Down

0 comments on commit 4f7aaf3

Please sign in to comment.