2009-02-20 17:30:26 +01:00
|
|
|
# norootforbuild
|
|
|
|
|
2010-06-01 23:32:29 +02:00
|
|
|
Name: cppcheck
|
2010-08-22 23:42:57 +02:00
|
|
|
Version: 1.44
|
2010-08-22 19:03:01 +02:00
|
|
|
Release: 0
|
2010-06-01 23:32:29 +02:00
|
|
|
License: GNU GPL v3 or later
|
|
|
|
Group: Development/Languages/C and C++
|
|
|
|
Url: http://cppcheck.wiki.sourceforge.net/
|
|
|
|
Source: http://downloads.sourceforge.net/cppcheck/cppcheck-%{version}.tar.bz2
|
|
|
|
Patch0: cppcheck-1.43-OptFlags.patch
|
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
|
|
BuildRequires: gcc-c++
|
|
|
|
BuildRequires: libqt4-devel
|
|
|
|
Summary: A tool for static C/C++ code analysis
|
2009-02-20 17:30:26 +01:00
|
|
|
|
|
|
|
%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-09-30 21:33:39 +02:00
|
|
|
%patch0
|
2009-02-20 17:30:26 +01:00
|
|
|
|
|
|
|
%build
|
2010-06-01 23:32:29 +02:00
|
|
|
%__make %{_smp_mflags}
|
|
|
|
cd gui
|
|
|
|
qmake
|
|
|
|
%__make %{_smp_mflags}
|
2009-02-20 17:30:26 +01:00
|
|
|
|
|
|
|
%check
|
2010-06-01 23:32:29 +02:00
|
|
|
%__make %{_smp_mflags} test
|
|
|
|
%__install -Dm 0755 gui/gui %{buildroot}%{_bindir}/cppcheck-gui
|
2009-02-20 17:30:26 +01:00
|
|
|
|
|
|
|
%install
|
|
|
|
%makeinstall
|
|
|
|
|
|
|
|
%clean
|
|
|
|
test "%{buildroot}" != "/" && %__rm -rf %{buildroot}
|
|
|
|
|
|
|
|
%files
|
|
|
|
%defattr(-,root,root)
|
2010-06-01 23:32:29 +02:00
|
|
|
%doc AUTHORS
|
2009-02-20 17:30:26 +01:00
|
|
|
%{_bindir}/cppcheck
|
2010-06-01 23:32:29 +02:00
|
|
|
%{_bindir}/cppcheck-gui
|