summaryrefslogtreecommitdiff
path: root/cppunit
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2012-01-21 15:21:16 +0100
committerStephan Bergmann <sbergman@redhat.com>2012-01-21 15:21:16 +0100
commit7c704c78d3c652504c064b4ac7af55a2c1ee49bb (patch)
tree623358cf25839219ef4fd90eea4f3eaa55389a1f /cppunit
parent0d5167915b47df7c3e450614ea50d845ba959df3 (diff)
Removed some unused parameters; added SAL_UNUSED_PARAMETER.
SAL_UNUSED_PARAMETER (expanding to __attribute__ ((unused)) for GCC) is used to annotate legitimately unused parameters, so that static analysis tools can tell legitimately unused parameters from truly unnecessary ones. To that end, some patches for external modules are also added, that are only applied when compiling with GCC and add necessary __attribute__ ((unused)) in headers.
Diffstat (limited to 'cppunit')
-rw-r--r--cppunit/cppunit-1.12.1-unused-parameters.patch11
-rw-r--r--cppunit/makefile.mk4
2 files changed, 14 insertions, 1 deletions
diff --git a/cppunit/cppunit-1.12.1-unused-parameters.patch b/cppunit/cppunit-1.12.1-unused-parameters.patch
new file mode 100644
index 000000000000..bb8e17fa21f8
--- /dev/null
+++ b/cppunit/cppunit-1.12.1-unused-parameters.patch
@@ -0,0 +1,11 @@
+--- misc/cppunit-1.12.1/include/cppunit/plugin/TestPlugIn.h 2012-01-18 10:28:28.189298501 +0100
++++ misc/build/cppunit-1.12.1/include/cppunit/plugin/TestPlugIn.h 2012-01-18 10:28:06.449450460 +0100
+@@ -153,7 +153,7 @@
+ // Unix
+ #elif defined(CPPUNIT_HAVE_UNIX_DLL_LOADER) || defined(CPPUNIT_HAVE_UNIX_SHL_LOADER)
+ #define CPPUNIT_PLUGIN_IMPLEMENT_MAIN() \
+- int main( int, char *[] ) \
++ int main() \
+ { \
+ return 0; \
+ } \
diff --git a/cppunit/makefile.mk b/cppunit/makefile.mk
index 20addae65dc9..316714962671 100644
--- a/cppunit/makefile.mk
+++ b/cppunit/makefile.mk
@@ -34,11 +34,13 @@ TARFILE_MD5=bd30e9cf5523cdfc019b94f5e1d7fd19
# from <https://sourceforge.net/projects/cppunit/files/cppunit/1.12.1/
# cppunit-1.12.1.tar.gz/download>
-PATCH_FILES = solarisfinite.patch warnings.patch windows.patch ldflags.patch aix.patch avoid-synthetised-destructor.patch ios.patch
+PATCH_FILES = solarisfinite.patch warnings.patch windows.patch ldflags.patch aix.patch avoid-synthetised-destructor.patch ios.patch cppunit-1.12.1-unused-parameters.patch
# solarisfinite.patch: see <https://sourceforge.net/tracker/?func=detail&
# aid=2912590&group_id=11795&atid=311795>
# warnings.patch: see <https://sourceforge.net/tracker/?func=detail&
# aid=2912630&group_id=11795&atid=311795>
+ # cppunit-1.12.1-unused-parameters.patch: help static analysis tools (see
+ # SAL_UNUSED_PARAMETER in sal/types.h)
.IF "$(OS)" == "ANDROID"
PATCH_FILES += android.patch