summaryrefslogtreecommitdiff
path: root/vigra/vigra1.4.0-unused-parameters.patch
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 /vigra/vigra1.4.0-unused-parameters.patch
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 'vigra/vigra1.4.0-unused-parameters.patch')
-rw-r--r--vigra/vigra1.4.0-unused-parameters.patch31
1 files changed, 31 insertions, 0 deletions
diff --git a/vigra/vigra1.4.0-unused-parameters.patch b/vigra/vigra1.4.0-unused-parameters.patch
new file mode 100644
index 000000000000..f32317865ea8
--- /dev/null
+++ b/vigra/vigra1.4.0-unused-parameters.patch
@@ -0,0 +1,31 @@
+--- misc/vigra1.4.0/include/vigra/basicimage.hxx 2012-01-19 22:49:11.232074631 +0100
++++ misc/build/vigra1.4.0/include/vigra/basicimage.hxx 2012-01-19 22:48:12.997439136 +0100
+@@ -72,7 +72,7 @@
+ difference_type offset_;
+ };
+
+- static void initialize(BaseType &) {}
++ static void initialize(__attribute__ ((unused)) BaseType &) {}
+
+ static reference dereference(BaseType const & d)
+ { return const_cast<reference>(*(*d.line_start_ + d.offset_)); }
+--- misc/vigra1.4.0/include/vigra/diff2d.hxx 2012-01-19 22:49:11.280074335 +0100
++++ misc/build/vigra1.4.0/include/vigra/diff2d.hxx 2012-01-19 22:49:00.129144170 +0100
+@@ -60,7 +60,7 @@
+ typedef Diff const * pointer;
+ typedef std::random_access_iterator_tag iterator_category;
+
+- static void initialize(BaseType &) {}
++ static void initialize(__attribute__ ((unused)) BaseType &) {}
+
+ static reference dereference(BaseType const & d)
+ { return d; }
+@@ -102,7 +102,7 @@
+ typedef Diff const * pointer;
+ typedef std::random_access_iterator_tag iterator_category;
+
+- static void initialize(BaseType & /*d*/) {}
++ static void initialize(__attribute__ ((unused)) BaseType & /*d*/) {}
+
+ static reference dereference(BaseType const & d)
+ { return d; }