Start here

Home
About Klocwork
What's new
Fixed issues
Release notes
Installation

Reference

C/C++ checkers
Java checkers
C# checkers
MISRA C 2004 checkers
MISRA C++ 2008 checkers
MISRA C 2012 checkers
MISRA C 2012 checkers with Amendment 1
Commands
Metrics
Troubleshooting
Reference

Product components

C/C++ Integration build analysis
Java Integration build analysis
Desktop analysis
Refactoring
Klocwork Static Code Analysis
Klocwork Code Review
Structure101
Tuning
Custom checkers

Coding environments

Visual Studio
Eclipse for C/C++
Eclipse for Java
IntelliJ IDEA
Other

Administration

Project configuration
Build configuration
Administration
Analysis performance
Server performance
Security/permissions
Licensing
Klocwork Static Code Analysis Web API
Klocwork Code Review Web API

Community

View help online
Visit RogueWave.com
Klocwork Support
Rogue Wave Videos

Legal

Legal information

Missing temporary files cause errors during Klocwork analysis

If you have a build system that creates temporary source files that are deleted after your build has run, this will cause errors in your analysis results. These temporary source files are captured in the Klocwork build specification and an error is recorded in the analysis results when these temporary files cannot be found.
Note: Not all temporary files should be ignored, such as temporary generated source that is directly or indirectly used by the source that is being analyzed. For more information about these types of files, see Example: Caching temporary source files
Below is an example of the error in the build.log file:
1> executing: "/space/ta/programs/kw-server-10.4.0.2095/bin/kwcc" "-c" "--security" "--metrics" "--ignore-extension" "--lang" "en" "-o" ...
1> kwcc:Error: Cannot open file /space/ta/csr/conftest.c: No such file
1> kwcc - Klocwork C/C++ Compiler 10.4 (10.4.0 for ix86-pc-linux)
1> kwcc:Error: No files to process.
1> Use '--help' to view help information.
1> Error: command '"/space/ta/programs/kw-server-10.4.0.2095/bin/kwcc" "-c" "--security" "--metrics" "--ignore-extension" "--lang" ...
Workaround: You can eliminate these errors by excluding the temporary files during the build specification creation stage with the --ignore-files option for kwinject:
kwinject --ignore-files <temporary_file_name(s)> <build_command>
For example, if you use 'make' as your build command and you have a temporary file called 'conftext.c' that you want to be excluded in your build specification, the command looks like this:
kwinject --ignore-files "conftest.c" make