编译android 4.0源码遇到variable ‘ParamName’ set but not used [-Werror=unused-but-set-variable]

host C++: llvm-rs-cc <= frameworks/compile/slang/slang_rs_export_foreach.cpp
frameworks/compile/slang/slang_rs_export_foreach.cpp: 在静态成员函数‘static slang::RSExportForEach* slang::RSExportForEach::Create(slang::RSContext*, const clang::FunctionDecl*)’中:
frameworks/compile/slang/slang_rs_export_foreach.cpp:247:23: 错误: variable ‘ParamName’ set but not used [-Werror=unused-but-set-variable]
cc1plus:所有的警告都被当作是错误
make: *** [out/host/linux-x86/obj/EXECUTABLES/llvm-rs-cc_intermediates/slang_rs_export_foreach.o] 错误 1

解决办法是:

找到frameworks/compile/slang/slang_rs_export_foreach.cpp:的247行,并将本行注释掉即可继续编译。

你可能感兴趣的:(android,android)