SHA256
1
0
forked from pool/cppcheck
cppcheck/cppcheck.spec
Marcus Meissner fe9bdee298 Accepting request 164061 from home:dalgaaf:branches:devel:tools
- update to 1.59:
 * Commandline/Settings changes:
   - New option to enable warnings but not style messages: 
     --enable=warning
   - Cppcheck used to skip includes where the header filename 
     is enclosed in <>. You can now include these headers also by 
     using -I. 
 * New checks:
   - New POSIX checks: pipe() buffer size, redundant calls of 
     set/get user id, too big value passed to usleep(), buffer 
     overflow when using write()
   - Storing getc() return value in char variable and comparing 
     to EOF.
   - Detect redundant bitand operations
   - Find suspicious equality comparisons like: if(a == 0) a == 1;
   - Warn about using malloc() for classes containing virtual
     methods, std::-objects or constructors
   - Portability check that warns when using NULL as argument to 
     variadic function. It has undefined behaviour on some 
     implementations.
 * Improvements:
   - Improved lookup for functions and types
   - Switched to TinyXml2 as XML library
   - Improved checking for uninitialized struct members, 
     variable scopes that can be reduced and unused functions
 * GUI:
   - Remember last path in open file dialog
   - Added command line parameter to open a results file
   - Bug in statistic calculation fixed

OBS-URL: https://build.opensuse.org/request/show/164061
OBS-URL: https://build.opensuse.org/package/show/devel:tools/cppcheck?expand=0&rev=34
2013-04-15 12:24:26 +00:00

85 lines
2.2 KiB
RPMSpec

# norootforbuild
BuildRequires: gcc-c++ libqt4-devel pcre-devel python
Name: cppcheck
Version: 1.59
Release: 0
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
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Summary: A tool for static C/C++ code analysis
#Requires: python-pygments
%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
%package gui
License: GNU GPL v3 or later
Group: Development/Languages/C and C++
Summary: A tool for static C/C++ code analysis
Requires: cppcheck
BuildRequires: python-qt4-devel
BuildRequires: libqt4-devel >= 4.8.0
%description gui
This is the gui for Cppcheck, a program to detect bugs that your C/C++ compiler
doesn't see.
%prep
%setup -q
%build
CXXFLAGS="-DNDEBUG %optflags" %__make %{_smp_mflags}
pushd gui
qmake
%__make %{_smp_mflags}
popd
%check
%__make %{_smp_mflags} test
%install
%makeinstall
%{__install} -m 0755 gui/cppcheck-gui %{buildroot}%{_bindir}/cppcheck-gui
pushd htmlreport
%{__python} setup.py install --prefix=%{_prefix} --root=%{buildroot}
popd
%clean
test "%{buildroot}" != "/" && %__rm -rf %{buildroot}
%files
%defattr(-,root,root)
%doc AUTHORS
%{_bindir}/cppcheck
%{_bindir}/cppcheck-htmlreport
%{python_sitelib}/cppcheck*.egg-info
%files gui
%defattr(-,root,root)
%{_bindir}/cppcheck-gui
%changelog