commit f80a3a5e1ac8d11b3dd4bc62209587b500ddb1c72ae4811169fea8a32898b06e Author: Petr Uzel Date: Fri Feb 20 16:30:26 2009 +0000 Copy from home:bitshuffler/cppcheck via accept of submit request 6553 Request was accepted with message: OBS-URL: https://build.opensuse.org/package/show/devel:tools/cppcheck?expand=0&rev=1 diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/cppcheck-1.28.tar.bz2 b/cppcheck-1.28.tar.bz2 new file mode 100644 index 0000000..b5b2b2f --- /dev/null +++ b/cppcheck-1.28.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b2b314be269a84f9a76cac0f16339d0ea23d158f541226420724ea5bea58501d +size 82406 diff --git a/cppcheck-Makefile-1.28.patch b/cppcheck-Makefile-1.28.patch new file mode 100644 index 0000000..33c4548 --- /dev/null +++ b/cppcheck-Makefile-1.28.patch @@ -0,0 +1,9 @@ +diff -Naur cppcheck-1.28.original/Makefile cppcheck-1.28/Makefile +--- cppcheck-1.28.original/Makefile 2009-02-10 19:07:47.000000000 +0100 ++++ cppcheck-1.28/Makefile 2009-02-10 19:08:13.000000000 +0100 +@@ -1,4 +1,4 @@ +-CXXFLAGS=-Wall -Wextra -pedantic -g ++CXXFLAGS=${RPM_OPT_FLAGS} + BIN=${DESTDIR}/usr/bin + + diff --git a/cppcheck.spec b/cppcheck.spec new file mode 100644 index 0000000..ba56c11 --- /dev/null +++ b/cppcheck.spec @@ -0,0 +1,57 @@ +# norootforbuild + +%define jobs $(( `/usr/bin/getconf _NPROCESSORS_ONLN` + 1 )) + +Name: cppcheck +Version: 1.28 +Release: 1.0 +License: GNU GPL v3 +Group: Development/Languages/C and C++ +Url: http://cppcheck.sourceforge.net/ +Source: %{name}-%{version}.tar.bz2 +Patch: cppcheck-Makefile-1.28.patch +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 +%patch -p1 + +%build +%__make %{?jobs:-j%jobs} + +%check +%__make test + +%install +%makeinstall + +%clean +test "%{buildroot}" != "/" && %__rm -rf %{buildroot} + +%files +%defattr(-,root,root) +%{_bindir}/cppcheck + +%changelog +* Tue Feb 10 2009 bitshuffler #suse@irc.freenode.org +- Initial RPM