2009-02-20 17:30:26 +01:00
|
|
|
# norootforbuild
|
|
|
|
|
|
|
|
%define jobs $(( `/usr/bin/getconf _NPROCESSORS_ONLN` + 1 ))
|
|
|
|
|
|
|
|
Name: cppcheck
|
2009-05-16 03:40:01 +02:00
|
|
|
Version: 1.32
|
2009-02-20 17:30:26 +01:00
|
|
|
Release: 1.0
|
|
|
|
License: GNU GPL v3
|
|
|
|
Group: Development/Languages/C and C++
|
2009-03-13 16:00:36 +01:00
|
|
|
Url: http://cppcheck.wiki.sourceforge.net/
|
|
|
|
Source: http://downloads.sourceforge.net/cppcheck/cppcheck-%{version}.tar.bz2
|
2009-04-15 11:02:34 +02:00
|
|
|
Patch: cppcheck-Makefile-1.31.patch
|
2009-02-20 17:30:26 +01:00
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
|
|
BuildRequires: gcc-c++
|
|
|
|
Summary: A tool for static C/C++ code analysis
|
|
|
|
|
|
|
|
%description
|
|
|
|
This program tries to detect bugs that your C/C++ compiler don't see. Cppcheck is versatile. You can check non-standard code that includes various compiler extensions, inline assembly code, etc. Checking covers for example these errors:
|
|
|
|
|
|
|
|
* Out of bounds
|
|
|
|
* Uninitialized member variable 'classname::varname'
|
|
|
|
* Using 'memfunc' on class
|
|
|
|
* Using 'memfunc' on struct that contains a 'std::classname'
|
|
|
|
* Class Base which is inherited by class Derived does not have a virtual destructor
|
|
|
|
* Memory leak: varname
|
|
|
|
* Resource leak: varname
|
|
|
|
* Deallocating a deallocated pointer: varname
|
|
|
|
* Using 'varname' after it is deallocated / released
|
|
|
|
* Invalid radix in call to strtol or strtoul. Must be 0 or 2-36
|
|
|
|
* Overlapping data buffer varname
|
|
|
|
* Unsigned division. The result will be wrong.
|
|
|
|
* Unusual pointer arithmetic
|
|
|
|
|
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -q
|
2009-04-15 11:02:34 +02:00
|
|
|
%patch
|
2009-02-20 17:30:26 +01:00
|
|
|
|
|
|
|
%build
|
|
|
|
%__make %{?jobs:-j%jobs}
|
|
|
|
|
|
|
|
%check
|
2009-05-16 03:40:01 +02:00
|
|
|
%__make %{?jobs:-j%jobs} test
|
2009-02-20 17:30:26 +01:00
|
|
|
|
|
|
|
%install
|
|
|
|
%makeinstall
|
|
|
|
|
|
|
|
%clean
|
|
|
|
test "%{buildroot}" != "/" && %__rm -rf %{buildroot}
|
|
|
|
|
|
|
|
%files
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%{_bindir}/cppcheck
|