Skip to content

Commit db5bc71

Browse files
authored
Fix and ignore some warnings (#8081)
1 parent dff115f commit db5bc71

File tree

4 files changed

+6
-3
lines changed

4 files changed

+6
-3
lines changed

CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,9 @@ if(NOT MSVC)
213213
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unused-parameter")
214214
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unknown-warning-option")
215215
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unknown-pragmas")
216+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-sign-compare")
217+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unused-variable")
218+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unused-function")
216219
if ($ENV{WERROR})
217220
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror")
218221
endif($ENV{WERROR})

caffe2/core/graph.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ struct Graph {
102102
*/
103103
void DeactivateSubgraph(std::vector<int> subgraph);
104104

105-
const size_t size() const {
105+
size_t size() const {
106106
return nodes_.size();
107107
}
108108

caffe2/core/nomnigraph/include/nomnigraph/Representations/ControlFlow.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ class BasicBlock {
4949
return Instructions;
5050
}
5151

52-
const bool hasInstruction(NodeRef instr) const {
52+
bool hasInstruction(NodeRef instr) const {
5353
return Nodes.hasNode(instr);
5454
}
5555

caffe2/share/contrib/nnpack/conv_op.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ class NNPACKConvOp final : public ConvPoolOpBase<CPUContext> {
3535
NNPACKConvOp(const OperatorDef& operator_def, Workspace* ws)
3636
: ConvPoolOpBase<CPUContext>(operator_def, ws),
3737
algorithm_(getConvolutionAlgorithm()),
38-
transformStrategy_(getConvolutionTransformStrategy()),
3938
activation_(getActivationType()),
39+
transformStrategy_(getConvolutionTransformStrategy()),
4040
ws_(ws) {
4141
OPERATOR_NEEDS_FEATURE(
4242
this->order_ == StorageOrder::NCHW,

0 commit comments

Comments
 (0)