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

HA.DUPLICATE

This checker reports on duplicate header file names.

The header analysis refactoring checkers (HA.*) detect unnecessary or missing transitive includes. Fixing header problems improves code maintainability.

How the header analysis refactoring checkers are used in Klocwork Desktop Analysis:

  • Klocwork Desktop C/C++ Plug-in for Visual Studio: These checkers are run as part of the desktop analysis, so that header issues appear in the issue list. If you disable one or more of these checkers, the relevant issues will not appear in your issue list, nor will the relevant refactorings be performed by the Optimize Headers menu option.
  • Klocwork Desktop C/C++ Plug-in for Eclipse: These checkers are not run as part of the desktop analysis, so header problems do not appear in the issue list. However, if you disable one or more of these checkers, the relevant issues will not be detected by the Analyze Headers and Optimize Headers menu options.
  • kwcheck for C/C++: These checkers are not used.
  • Klocwork Desktop for C/C++: These checkers are not used.

Vulnerable code example

#include <stdio.h>
#include <stdio.h> // HA.DUPLICATE: Duplicate header file 'stdio.h'.

int main(int argc, char *argv[]) {
  printf("argc=%d\n", argc);
  return 0;
} 

Related checkers