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

RR.IGNORED

The "RR Value returned by read() or skip() is never checked" error appears when a code entity ignores the result of a read() or skip() method. In this case, another entity may need to read an array of bytes of some length. The array may not be available for reading. RR.IGNORED indicates that a value returned by read() or skip() is never checked.

Example 1

14     void copyFile(String src, String dest) {
15         try {
16             File srcFile = new File(src);
17             File destFile = new File(dest);
18             FileInputStream fis =
19                     new FileInputStream(srcFile);
20             FileOutputStream fos =
21                     new FileOutputStream(destFile);
22             byte bytes[] = new byte[1024];
23             fis.read(bytes);
24             fos.write(bytes, 0, bytes.length);
25             fis.close();
26             fos.close();
27         } catch (IOException e) {
28             e.printStackTrace();
29         }
30     }

RR.IGNORED is reported for 'read' call on line 23: The value returned by 'java.io.FileInputStream.read'() method is ignored.