我使用以下配置配置了Coverity
构建成功,但我在系统标头中收到Recoverable errors
(请参阅build-log.txt)
对我来说,不清楚为什么会发生这些错误(构建成功),以及如何配置Coverity
使这些错误根本不发生?
2022-10-20T13:38:11.227719Z|cov-build|66594|info|> cov-build 2022.3.3 (build d37b3c67c6 p-2022.3-push-69)
2022-10-20T13:38:11.227742Z|cov-build|66594|info|> Coverity Build Capture (64-bit) version 2022.3.3 on Linux 5.15.0-48-generic x86_64
2022-10-20T13:38:11.227742Z|cov-build|66594|info|> Internal version numbers: d37b3c67c6 p-2022.3-push-69
2022-10-20T13:38:11.227742Z|cov-build|66594|info|>
2022-10-20T13:38:11.227757Z|cov-build|66594|info|> Dumping from hostname : ci
2022-10-20T13:38:11.227757Z|cov-build|66594|info|>
2022-10-20T13:38:11.227764Z|cov-build|66594|info|> Platform info:
2022-10-20T13:38:11.227764Z|cov-build|66594|info|> Sysname = Linux
2022-10-20T13:38:11.227764Z|cov-build|66594|info|> Release = 5.15.0-48-generic
2022-10-20T13:38:11.227764Z|cov-build|66594|info|> Machine = x86_64
2022-10-20T13:38:11.227764Z|cov-build|66594|info|>
2022-10-20T13:38:11.227764Z|cov-build|66594|info|>
2022-10-20T13:38:11.227780Z|cov-build|66594|info|> cov-build command: cov-build --dir build/test/icc cmake --build .
2022-10-20T13:38:11.227786Z|cov-build|66594|info|> cov-build expanded command: cov-build --dir build/test/icc cmake --build .
2022-10-20T13:38:11.227957Z|cov-build|66594|info|> build command: /usr/bin/cmake --build .
2022-10-20T13:38:11.227966Z|cov-build|66594|info|> thunk command: /opt/coverity/cov-analysis-2022-3/bin/cov-internal-thunk.sh cmake --build .
2022-10-20T13:38:11.227966Z|cov-build|66594|info|>
2022-10-20T13:38:11.227974Z|cov-build|66594|info|> Set UseSharedCompilation to false.
2022-10-20T13:38:11.227982Z|cov-build|66594|info|> Set COVERITY_BIN to /opt/coverity/cov-analysis-2022-3/bin
2022-10-20T13:38:11.227993Z|cov-build|66594|info|> Set COVERITY_SITE_CC to iccarm
2022-10-20T13:38:11.227999Z|cov-build|66594|info|> Set COVERITY_SITE_CC_CAPTURE_DESCENDANTS to
2022-10-20T13:38:11.228005Z|cov-build|66594|info|> Set COVERITY_TEMP to /tmp/cov-repo/61cbee90e75bbbfcd24d03a3fa896a77
2022-10-20T13:38:11.228015Z|cov-build|66594|info|> Set COVERITY_COMMON_TEMP to /tmp
2022-10-20T13:38:11.228023Z|cov-build|66594|info|> Set COVERITY_IDIR to /home/repo/.jenkins/workspace/xxx/build/test/icc/build/test/icc
2022-10-20T13:38:11.228048Z|cov-build|66594|info|> Set COVERITY_OUTPUT to /home/repo/.jenkins/workspace/xxx/build/test/icc/build/test/icc/build-log.txt
2022-10-20T13:38:11.228053Z|cov-build|66594|info|> Set COVERITY_LOG to /home/repo/.jenkins/workspace/xxx/build/test/icc/build/test/icc/build-log.txt
2022-10-20T13:38:11.228061Z|cov-build|66594|info|> Set COVERITY_OUTPUT_ENCODING to US-ASCII
2022-10-20T13:38:11.228066Z|cov-build|66594|info|> Set COVERITY_SYSTEM_ENCODING to US-ASCII
2022-10-20T13:38:11.228073Z|cov-build|66594|info|> Set COVERITY_EMIT to /home/repo/.jenkins/workspace/xxx/build/test/icc/build/test/icc/emit
2022-10-20T13:38:11.228095Z|cov-build|66594|info|> Set COVERITY_IS_COMPILER to 0
2022-10-20T13:38:11.228100Z|cov-build|66594|info|> Set COVERITY_TOP_PROCESS to 0
2022-10-20T13:38:11.228103Z|cov-build|66594|info|> Set COVERITY_IS_COMPILER_DESCENDANT to 0
2022-10-20T13:38:11.228107Z|cov-build|66594|info|> Set COVERITY_DISENGAGE_EXES to "qemuwrapper;qemu-aarch64;qemu-alpha;qemu-arm;qemu-armeb;qemu-cris;qemu-i386;qemu-m68k;qemu-microblaze;qemu-mips;qemu-mipsel;qemu-nios2;qemu-ppc;qemu-ppc64;qemu-ppc64abi32;qemu-sh4;qemu-sh4eb;qemu-sparc;qemu-sparc32plus;qemu-sparc64;qemu-x86_64"
2022-10-20T13:38:11.228123Z|cov-build|66594|info|>
2022-10-20T13:38:11.228123Z|cov-build|66594|info|>
2022-10-20T13:38:11.228123Z|cov-build|66594|info|> Dumping Environment Variables:
2022-10-20T13:38:11.228123Z|cov-build|66594|info|>
2022-10-20T13:38:11.228142Z|cov-build|66594|info|> JENKINS_HOME=/home/repo/.jenkins
2022-10-20T13:38:11.228146Z|cov-build|66594|info|> GIT_PREVIOUS_SUCCESSFUL_COMMIT=5ecdaedd1ad5f4173cc5aa22a7ff06a2d7aa659b
2022-10-20T13:38:11.228151Z|cov-build|66594|info|> CI=true
2022-10-20T13:38:11.228154Z|cov-build|66594|info|> RUN_CHANGES_DISPLAY_URL=http://unconfigured-jenkins-location/job/xxx/324/display/redirect?page=changes
2022-10-20T13:38:11.228158Z|cov-build|66594|info|> HOSTNAME=ci
2022-10-20T13:38:11.228167Z|cov-build|66594|info|> NODE_LABELS=built-in
2022-10-20T13:38:11.228171Z|cov-build|66594|info|> GIT_COMMIT=c8902b01612b12a90701b3949e8be64e65775ba7
2022-10-20T13:38:11.228175Z|cov-build|66594|info|> HOME=/home/repo
2022-10-20T13:38:11.228179Z|cov-build|66594|info|> HUDSON_COOKIE=94d36788-17b8-4a07-a30e-6e22a28d86dc
2022-10-20T13:38:11.228183Z|cov-build|66594|info|> JENKINS_SERVER_COOKIE=durable-d67ab9cc6fd15cde89a20cb1f752777478da5dc72dc942e65e59bab789c478c1
2022-10-20T13:38:11.228187Z|cov-build|66594|info|> WORKSPACE=/home/repo/.jenkins/workspace/xxx
2022-10-20T13:38:11.228190Z|cov-build|66594|info|> CROSS_ROOT=/opt/iarsystems/bxarm-9.30.1/arm
2022-10-20T13:38:11.228194Z|cov-build|66594|info|> NODE_NAME=built-in
2022-10-20T13:38:11.228198Z|cov-build|66594|info|> RUN_ARTIFACTS_DISPLAY_URL=http://unconfigured-jenkins-location/job/xxx/324/display/redirect?page=artifacts
2022-10-20T13:38:11.228201Z|cov-build|66594|info|> ASM=iasmarm
2022-10-20T13:38:11.228205Z|cov-build|66594|info|> STAGE_NAME=Icc Arm + Coverity
2022-10-20T13:38:11.228209Z|cov-build|66594|info|> EXECUTOR_NUMBER=0
2022-10-20T13:38:11.228213Z|cov-build|66594|info|> GIT_BRANCH=origin/master
2022-10-20T13:38:11.228217Z|cov-build|66594|info|> TERM=xterm
2022-10-20T13:38:11.228220Z|cov-build|66594|info|> RUN_TESTS_DISPLAY_URL=http://unconfigured-jenkins-location/job/xxx/324/display/redirect?page=tests
2022-10-20T13:38:11.228224Z|cov-build|66594|info|> BUILD_DISPLAY_NAME=#324
2022-10-20T13:38:11.228228Z|cov-build|66594|info|> HUDSON_HOME=/home/repo/.jenkins
2022-10-20T13:38:11.228232Z|cov-build|66594|info|> JOB_BASE_NAME=xxx
2022-10-20T13:38:11.228236Z|cov-build|66594|info|> PATH=/opt/coverity/cov-analysis-2022-3/bin:/opt/SEGGER/JLink_V766:/opt/iarsystems/bxarm-9.30.1/common/bin:/opt/iarsystems/bxarm-9.30.1/arm/bin:/opt/gcc-arm-none-eabi-10.3-2021.07/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
2022-10-20T13:38:11.228240Z|cov-build|66594|info|> TOOLCHAIN_FILE=../../../cmake/platforms/$TOOLCHAIN_FILENAME
2022-10-20T13:38:11.228244Z|cov-build|66594|info|> BUILD_ID=324
2022-10-20T13:38:11.228247Z|cov-build|66594|info|> BUILD_TAG=jenkins-xxx-324
2022-10-20T13:38:11.228251Z|cov-build|66594|info|> GIT_URL=file:///home/repo/repository
2022-10-20T13:38:11.228255Z|cov-build|66594|info|> BUILD_NUMBER=324
2022-10-20T13:38:11.228259Z|cov-build|66594|info|> JENKINS_NODE_COOKIE=a1e213c4-5eae-41f4-bff8-c26bcc76eacd
2022-10-20T13:38:11.228262Z|cov-build|66594|info|> CXX=iccarm
2022-10-20T13:38:11.228266Z|cov-build|66594|info|> RUN_DISPLAY_URL=http://unconfigured-jenkins-location/job/xxx/324/display/redirect
2022-10-20T13:38:11.228270Z|cov-build|66594|info|> HUDSON_SERVER_COOKIE=e67de7100ca0e18a
2022-10-20T13:38:11.228274Z|cov-build|66594|info|> JOB_DISPLAY_URL=http://unconfigured-jenkins-location/job/xxx/display/redirect
2022-10-20T13:38:11.228278Z|cov-build|66594|info|> JOB_NAME=xxx
2022-10-20T13:38:11.228282Z|cov-build|66594|info|> PWD=/home/repo/.jenkins/workspace/xxx/build/test/icc
2022-10-20T13:38:11.228286Z|cov-build|66594|info|> GIT_PREVIOUS_COMMIT=6ec26434a11544368ba767770e88c74dd3391906
2022-10-20T13:38:11.228290Z|cov-build|66594|info|> WORKSPACE_TMP=/home/repo/.jenkins/workspace/xxx@tmp
2022-10-20T13:38:11.228293Z|cov-build|66594|info|> CC=iccarm
2022-10-20T13:38:11.228297Z|cov-build|66594|info|> TOOLCHAIN_FILENAME=toolchain-iar-iccarm.cmake
2022-10-20T13:38:11.228301Z|cov-build|66594|info|> COVERITY_PREV_XML_CATALOG_FILES=
2022-10-20T13:38:11.228305Z|cov-build|66594|info|> COVERITY_TOP_CONFIG=/tmp/cov-repo/61cbee90e75bbbfcd24d03a3fa896a77/cov-configure/coverity_config.xml
2022-10-20T13:38:11.228309Z|cov-build|66594|info|> COVERITY_BUILD_INVOCATION_ID=1
2022-10-20T13:38:11.228313Z|cov-build|66594|info|> COVERITY_CONFIG_FILE=/opt/coverity/cov-analysis-2022-3/config/coverity_config.xml
2022-10-20T13:38:11.228317Z|cov-build|66594|info|> UseSharedCompilation=false
2022-10-20T13:38:11.228321Z|cov-build|66594|info|> COVERITY_BIN=/opt/coverity/cov-analysis-2022-3/bin
2022-10-20T13:38:11.228325Z|cov-build|66594|info|> COVERITY_SITE_CC=iccarm
2022-10-20T13:38:11.228332Z|cov-build|66594|info|> COVERITY_SITE_CC_CAPTURE_DESCENDANTS=
2022-10-20T13:38:11.228336Z|cov-build|66594|info|> COVERITY_TEMP=/tmp/cov-repo/61cbee90e75bbbfcd24d03a3fa896a77
2022-10-20T13:38:11.228340Z|cov-build|66594|info|> COVERITY_COMMON_TEMP=/tmp
2022-10-20T13:38:11.228344Z|cov-build|66594|info|> COVERITY_IDIR=/home/repo/.jenkins/workspace/xxx/build/test/icc/build/test/icc
2022-10-20T13:38:11.228348Z|cov-build|66594|info|> COVERITY_REWRITE_FROM=
2022-10-20T13:38:11.228352Z|cov-build|66594|info|> COVERITY_REWRITE_TO=
2022-10-20T13:38:11.228356Z|cov-build|66594|info|> COVERITY_ENABLE_JAVA_ANNOTATION_FRAMEWORK_SUPPORT=1
2022-10-20T13:38:11.228360Z|cov-build|66594|info|> COVERITY_OUTPUT=/home/repo/.jenkins/workspace/xxx/build/test/icc/build/test/icc/build-log.txt
2022-10-20T13:38:11.228364Z|cov-build|66594|info|> COVERITY_LOG=/home/repo/.jenkins/workspace/xxx/build/test/icc/build/test/icc/build-log.txt
2022-10-20T13:38:11.228367Z|cov-build|66594|info|> COVERITY_OUTPUT_ENCODING=US-ASCII
2022-10-20T13:38:11.228371Z|cov-build|66594|info|> COVERITY_SYSTEM_ENCODING=US-ASCII
2022-10-20T13:38:11.228375Z|cov-build|66594|info|> COVERITY_EMIT=/home/repo/.jenkins/workspace/xxx/build/test/icc/build/test/icc/emit
2022-10-20T13:38:11.228379Z|cov-build|66594|info|> COVERITY_IS_COMPILER=0
2022-10-20T13:38:11.228383Z|cov-build|66594|info|> COVERITY_TOP_PROCESS=0
2022-10-20T13:38:11.228387Z|cov-build|66594|info|> COVERITY_IS_COMPILER_DESCENDANT=0
2022-10-20T13:38:11.228390Z|cov-build|66594|info|> COVERITY_DISENGAGE_EXES=qemuwrapper;qemu-aarch64;qemu-alpha;qemu-arm;qemu-armeb;qemu-cris;qemu-i386;qemu-m68k;qemu-microblaze;qemu-mips;qemu-mipsel;qemu-nios2;qemu-ppc;qemu-ppc64;qemu-ppc64abi32;qemu-sh4;qemu-sh4eb;qemu-sparc;qemu-sparc32plus;qemu-sparc64;qemu-x86_64
2022-10-20T13:38:11.228395Z|cov-build|66594|info|> COVERITY_COMPILER_PATH_MISMATCH_FILE=/home/repo/.jenkins/workspace/xxx/build/test/icc/build/test/icc/has_path_mismatches
2022-10-20T13:38:11.228399Z|cov-build|66594|info|> COVERITY_PATHLESS_CONFIGS_FILE=/home/repo/.jenkins/workspace/xxx/build/test/icc/build/test/icc/has_pathless_configs
2022-10-20T13:38:11.228405Z|cov-build|66594|info|>
2022-10-20T13:38:11.228405Z|cov-build|66594|info|>
2022-10-20T13:38:11.228405Z|cov-build|66594|info|> Dumping configuration:
2022-10-20T13:38:11.228405Z|cov-build|66594|info|>
2022-10-20T13:38:11.228415Z|cov-build|66594|info|> User/default configuration:
2022-10-20T13:38:11.228415Z|cov-build|66594|info|>
2022-10-20T13:38:11.228421Z|cov-build|66594|info|> Configuration read from: command-line
2022-10-20T13:38:11.228421Z|cov-build|66594|info|> Node: coverity
2022-10-20T13:38:11.228421Z|cov-build|66594|info|> Node: config
2022-10-20T13:38:11.228421Z|cov-build|66594|info|> Node: include Value: /opt/coverity/cov-analysis-2022-3/config/coverity_config.xml
2022-10-20T13:38:11.228421Z|cov-build|66594|info|> Node: config
2022-10-20T13:38:11.228421Z|cov-build|66594|info|> Node: prevent
2022-10-20T13:38:11.228421Z|cov-build|66594|info|> Node: dir Value: /home/repo/.jenkins/workspace/xxx/build/test/icc/build/test/icc
2022-10-20T13:38:11.228421Z|cov-build|66594|info|>
2022-10-20T13:38:11.228444Z|cov-build|66594|info|> Configuration read from: /opt/coverity/cov-analysis-2022-3/config/coverity_config.xml
2022-10-20T13:38:11.228444Z|cov-build|66594|info|> Node: coverity
2022-10-20T13:38:11.228444Z|cov-build|66594|info|> Node: cit_version Value: 1
2022-10-20T13:38:11.228444Z|cov-build|66594|info|> Node: config
2022-10-20T13:38:11.228444Z|cov-build|66594|info|> Node: include Value: /opt/coverity/cov-analysis-2022-3/config/template-iar_cxx_arm-config-0/coverity_config.xml
2022-10-20T13:38:11.228444Z|cov-build|66594|info|>
2022-10-20T13:38:11.228461Z|cov-build|66594|info|> Configuration read from: /opt/coverity/cov-analysis-2022-3/config/template-iar_cxx_arm-config-0/coverity_config.xml
2022-10-20T13:38:11.228461Z|cov-build|66594|info|> Node: coverity
2022-10-20T13:38:11.228461Z|cov-build|66594|info|> Node: cit_version Value: 1
2022-10-20T13:38:11.228461Z|cov-build|66594|info|> Node: config
2022-10-20T13:38:11.228461Z|cov-build|66594|info|> Node: build
2022-10-20T13:38:11.228461Z|cov-build|66594|info|> Node: compiler
2022-10-20T13:38:11.228461Z|cov-build|66594|info|> Node: template_compiler Value: true
2022-10-20T13:38:11.228461Z|cov-build|66594|info|> Node: comp_name Value: iccarm
2022-10-20T13:38:11.228461Z|cov-build|66594|info|> Node: comp_translator Value: iar_cxx:arm
2022-10-20T13:38:11.228461Z|cov-build|66594|info|> Node: comp_lang Value: C++
2022-10-20T13:38:11.228461Z|cov-build|66594|info|> Node: comp_generic Value: iar/arm
2022-10-20T13:38:11.228461Z|cov-build|66594|info|> Node: options
2022-10-20T13:38:11.228461Z|cov-build|66594|info|> Node: id Value: iar_cxx:arm-iccarm-.*
2022-10-20T13:38:11.228461Z|cov-build|66594|info|> Node: opt_preinclude_file Value: /opt/coverity/cov-analysis-2022-3/config/template-iar_cxx_arm-config-0/../user_nodefs.h
2022-10-20T13:38:11.228461Z|cov-build|66594|info|> Node: begin_command_line_config
2022-10-20T13:38:11.228461Z|cov-build|66594|info|> Node: md5 Value: 5f6642eb878a88db1dfb16309fb4338b
2022-10-20T13:38:11.228461Z|cov-build|66594|info|>
2022-10-20T13:38:11.230365Z|cov-build|66594|info|> Using LD_PRELOAD =
/opt/coverity/cov-analysis-2022-3/bin/libcapture-linux64-${PLATFORM}.so
[73713] EXECUTING: /opt/iarsystems/bxarm-9.30.1/arm/bin/ielfdumparm --source test.out
...
[73394] EXECUTING: grep dev
[STATUS] Compiling /home/repo/.jenkins/workspace/xxx/src/nodynalloc/new_del.cpp
/opt/coverity/cov-analysis-2022-3/bin/cov-emit --dir=/home/repo/.jenkins/workspace/xxx/build/test/icc/build/test/icc --ignore_path=/tmp/cov-repo/61cbee90e75bbbfcd24d03a3fa896a77/cov-configure --ignore_path=/tmp/cov-repo/61cbee90e75bbbfcd24d03a3fa896a77/cov-repo/ab3163e8db5f4764170d37b222c3d703 --pre_preinclude /home/repo/.jenkins/workspace/xxx/build/test/icc/build/test/icc/emit/ci/config/5092253b194ec0553c3a9de3b66cf08a/iar_cxx_arm-config-0/coverity-macro-compat.h --pre_preinclude /home/repo/.jenkins/workspace/xxx/build/test/icc/build/test/icc/emit/ci/config/5092253b194ec0553c3a9de3b66cf08a/iar_cxx_arm-config-0/coverity-compiler-compat.h --c++ --dollar --allow_qualified_anonymous_unions --allow_global_anonymous_union --no_const_string_literals --unsigned_chars --trigraphs --enable_user_sections --add_type_modifier=__absolute,__big_endian --add_type_modifier=__little_endian --add_type_modifier=__packed,__pcrel --add_type_modifier=__sbrel,__global_reg --add_type_modifier=__coverity_16bit_float --allow_qualified_operator_new_return --lazy_hex_pp_number --short_enums --user_defined_literals --macro_preempts_udl_suffix --ppp_translator "replace/_Mem \*operator new(\[\])? _Mem/*operator new$1" --ppp_translator "replace/operator new mem/operator new" --ppp_translator replace/0.Infinity/1.0\/0.0 --ppp_translator replace/0.Na[Nn]/0.0\/0.0 --allow_injected_template_symbol --arg_dependent_overload --class_scope_noexcept --no_predefined_cplusplus -w --no_predefines --comp_ver 9030001 --char_bit_size=8 --wchar_t_keyword --no_multiline_string --ignore_calling_convention --no_enable_80bit_float --no_enable_128bit_float --macro_stack_pragmas --type_traits_helpers --rtti --inline_keyword --has_include_macro --has_include_next_macro --has_cpp_attribute_macro --no_predefines --preinclude /opt/coverity/cov-analysis-2022-3/config/template-iar_cxx_arm-config-0/../user_nodefs.h --c++17 --c++17 --no_rtti --no_exceptions --short_enums --gnu_version=50400 --macro_stack_pragmas --add_type_modifier=__data:1,__code --no_stdarg_builtin --sys_include /opt/iarsystems/bxarm-9.30.1/arm/inc/c --sys_include /opt/iarsystems/bxarm-9.30.1/arm/inc/c/aarch32 --sys_include /opt/iarsystems/bxarm-9.30.1/arm/inc/cpp --ppp_translator replace/(#include\s+)u8/$1 --ppp_translator replace/(#define\s+_DLIB_CONFIG_FILE_HEADER_NAME\s+)u8/$1 --ppp_translator replace/(#define\s+_DLIB_CONFIG_FILE_STRING\s+)u8/$1 --ppp_translator replace/(typedef\s+_Align_type<)::/$1 -DNDEBUG -U__EXCEPTIONS -D__coverity_undefine___EXCEPTIONS -D__FAR_RUNTIME_ATTRIBUTE__=__near_func -U__FOR_DEBUG__ -D__coverity_undefine___FOR_DEBUG__ -D__LITTLE_ENDIAN__=1 -U__PLACEMENT_DELETE -D__coverity_undefine___PLACEMENT_DELETE -U__RTTI -D__coverity_undefine___RTTI -U__STDC_VERSION__ -D__coverity_undefine___STDC_VERSION__ -U__coverity_undefine___STDC_VERSION__ -D__coverity_undefine___coverity_undefine___STDC_VERSION__ -U__cpp_exceptions -D__coverity_undefine___cpp_exceptions -U__cpp_rtti -D__coverity_undefine___cpp_rtti --type_sizes=dex8Pfilw4s2 --type_alignments=dex8Pfilw4s2 --size_t_type=j --ptrdiff_t_type=i /home/repo/.jenkins/workspace/xxx/src/nodynalloc/new_del.cpp
[73393] EXECUTING: /bin/mount
"/opt/iarsystems/bxarm-9.30.1/arm/inc/c/xstddef0", line 16: warning #59:
function call is not allowed in a constant expression
#if _HAS_NOEXCEPT || !_HAS_EXCEPTIONS
^
[73399] EXECUTING: grep dev
"/opt/iarsystems/bxarm-9.30.1/arm/inc/c/xstddef0", line 16: warning #59:
function call is not allowed in a constant expression
#if _HAS_NOEXCEPT || !_HAS_EXCEPTIONS
^
[73398] EXECUTING: /bin/mount
"/opt/iarsystems/bxarm-9.30.1/arm/inc/c/xstddef0", line 16: warning #59:
function call is not allowed in a constant expression
#if _HAS_NOEXCEPT || !_HAS_EXCEPTIONS
^
"/opt/iarsystems/bxarm-9.30.1/arm/inc/c/yvals.h", line 159: warning #59:
function call is not allowed in a constant expression
#if _HAS_NOEXCEPT
^
"/opt/iarsystems/bxarm-9.30.1/arm/inc/c/xstddef0", line 16: warning #59:
function call is not allowed in a constant expression
#if _HAS_NOEXCEPT || !_HAS_EXCEPTIONS
^
"/opt/iarsystems/bxarm-9.30.1/arm/inc/c/xmemnew", line 7: warning #59: function
call is not allowed in a constant expression
#if __has_feature(cxx_noexcept)
^
"/opt/iarsystems/bxarm-9.30.1/arm/inc/c/xmemnew", line 7: warning #59: function
call is not allowed in a constant expression
#if __has_feature(cxx_noexcept)
^
[73403] EXECUTING: /bin/mount
[73404] EXECUTING: grep dev
"/opt/iarsystems/bxarm-9.30.1/arm/inc/c/xmemnew", line 7: warning #59: function
call is not allowed in a constant expression
#if __has_feature(cxx_noexcept)
...
2022-10-20T13:38:39.392031Z|cov-build|66594|info|> Invoking cov-security-da with commands: /opt/coverity/cov-analysis-2022-3/bin/cov-security-da --dir /home/repo/.jenkins/workspace/xxx/build/test/icc/build/test/icc
2022-10-20T13:38:39.401624Z|cov-build|66594|info|> Dynamic analyzer took 9 ms
2022-10-20T13:38:39.401624Z|cov-build|66594|info|> Build time (cov-build overall): 00:00:28.195804
2022-10-20T13:38:39.401624Z|cov-build|66594|info|>
2022-10-20T13:38:39.402216Z|cov-build|66594|info|> Build time (C/C++ emits total): 00:06:17.288925
2022-10-20T13:38:39.402216Z|cov-build|66594|info|>
2022-10-20T13:38:39.402216Z|cov-build|66594|info|>
2022-10-20T13:38:39.402240Z|cov-build|66594|info|> Emitted 15 C/C++ compilation units (100%) successfully
2022-10-20T13:38:39.402240Z|cov-build|66594|info|> [WARNING] Recoverable errors were encountered during 12 of these C/C++ compilation units.
2022-10-20T13:38:39.402240Z|cov-build|66594|info|>
2022-10-20T13:38:39.402240Z|cov-build|66594|info|> 15 C/C++ compilation units (100%) are ready for analysis
2022-10-20T13:38:39.402240Z|cov-build|66594|info|> For more details, please look at:
2022-10-20T13:38:39.402240Z|cov-build|66594|info|> /home/repo/.jenkins/workspace/xxx/build/test/icc/build/test/icc/build-log.txt
2条答案
按热度按时间xcitsw881#
关于标题中的问题(如何配置IAR),我认为您的
cov-configure
命令行是正确的。警告消息(
function call is not allowed in a constant expression
)来自Coverity编译器,它认为输入不是有效的C++,因此发出警告。编译器只是注意到了这个问题,但仍然继续,就像处理任何其他编译器警告一样。(当分析运行时,如果有保真度的结果,您将看到报告的RW.ROUTINE_NOT_EMITTED
问题。)因为问题是从Coverity编译器内部产生的,所以用户没有任何简单的方法来抑制这些消息。我的建议是创建一个最小的复制器,并将其发送给Coverity支持,以便他们最终在产品中修复。如果你真的想自己修复它,您可能可以使用编译器配置中的
ppp_translator
(“ppp”代表“pre-preprocessor”)元素来动态重写违规代码,从而修复它,但这不是一项简单的工作。n53p2ov02#
请参阅(包含解决方法以及应修复该问题的版本的信息)
https://community.synopsys.com/s/article/warning-59-function-call-is-not-allowed-in-a-constant-expression-if-HAS-NOEXCEPT