error: variable ‘use_dilation’ set but not used in building intel caffe
error: variable ‘use_dilation’ set but not used in building intel caffe
我正在尝试构建 intel caffe。
我使用 g++ 版本 5.5.0.
我在
有错误
src/caffe/layer_factory.cpp:91:8: error: variable ‘use_dilation’ set but not used [-Werror=unused-but-set-variable]
bool use_dilation = false;
^
src/caffe/layer_factory.cpp: In instantiation of ‘boost::shared_ptr<caffe::Layer > caffe::GetConvolutionLayer(const caffe::LayerParameter&) [with Dtype = double]’:
src/caffe/layer_factory.cpp:163:1: required from here
src/caffe/layer_factory.cpp:91:8: error: variable ‘use_dilation’ set but not used [-Werror=unused-but-set-variable]
cc1plus: all warnings being treated as errors
Makefile:810: recipe for target '.build_release/src/caffe/layer_factory.o' failed
make: *** [.build_release/src/caffe/layer_factory.o] Error 1
make: *** Waiting for unfinished jobs....
有什么问题吗?
我尝试添加
use_dilation = 假;初始化后。
但是还是有错误。
我该如何解决?
警告本身只是次要的。正如 Ulug Toprak 指出的那样,只有一个未使用的变量。但是你因此得到一个错误:
cc1plus: all warnings being treated as errors
在Makefile:422中有这一行:
CXX_HARDENING_FLAGS += -fPIC -fno-operator-names -Wformat -Wformat-security -Wall -Werror
这会导致将警告视为错误。只需删除 -Werror
标志。
我正在尝试构建 intel caffe。 我使用 g++ 版本 5.5.0.
我在
有错误src/caffe/layer_factory.cpp:91:8: error: variable ‘use_dilation’ set but not used [-Werror=unused-but-set-variable]
bool use_dilation = false;
^
src/caffe/layer_factory.cpp: In instantiation of ‘boost::shared_ptr<caffe::Layer > caffe::GetConvolutionLayer(const caffe::LayerParameter&) [with Dtype = double]’:
src/caffe/layer_factory.cpp:163:1: required from here
src/caffe/layer_factory.cpp:91:8: error: variable ‘use_dilation’ set but not used [-Werror=unused-but-set-variable]
cc1plus: all warnings being treated as errors
Makefile:810: recipe for target '.build_release/src/caffe/layer_factory.o' failed
make: *** [.build_release/src/caffe/layer_factory.o] Error 1
make: *** Waiting for unfinished jobs....
有什么问题吗?
我尝试添加 use_dilation = 假;初始化后。 但是还是有错误。
我该如何解决?
警告本身只是次要的。正如 Ulug Toprak 指出的那样,只有一个未使用的变量。但是你因此得到一个错误:
cc1plus: all warnings being treated as errors
在Makefile:422中有这一行:
CXX_HARDENING_FLAGS += -fPIC -fno-operator-names -Wformat -Wformat-security -Wall -Werror
这会导致将警告视为错误。只需删除 -Werror
标志。