[ladvd/f15/master] - fix FTBFS caused by -Werror=unused-but-set-variable

Tomasz Torcz ttorcz at fedoraproject.org
Tue Feb 15 18:46:58 UTC 2011


commit 7549aee93e392da1b103d69795e777f2e85afc64
Author: Tomasz Torcz <tomek at pipebreaker.pl>
Date:   Tue Feb 15 19:46:28 2011 +0100

    - fix FTBFS caused by -Werror=unused-but-set-variable

 ladvd-0.9.2-add-attribute-unused-to-tlv.patch |   36 +++++++++++++++++++++++++
 ladvd.spec                                    |    8 +++++-
 2 files changed, 43 insertions(+), 1 deletions(-)
---
diff --git a/ladvd-0.9.2-add-attribute-unused-to-tlv.patch b/ladvd-0.9.2-add-attribute-unused-to-tlv.patch
new file mode 100644
index 0000000..55fcdf4
--- /dev/null
+++ b/ladvd-0.9.2-add-attribute-unused-to-tlv.patch
@@ -0,0 +1,36 @@
+diff -ur ladvd-0.9.2.orig/src/proto/cdp.c ladvd-0.9.2/src/proto/cdp.c
+--- ladvd-0.9.2.orig/src/proto/cdp.c	2011-02-15 08:59:08.959886752 +0100
++++ ladvd-0.9.2/src/proto/cdp.c	2011-02-15 09:00:51.917237348 +0100
+@@ -261,7 +261,7 @@
+     size_t length;
+     struct cdp_header cdp;
+ 
+-    char *tlv;
++    char __attribute__((__unused__)) *tlv;
+     char *pos;
+     tlv_t type;
+ 
+diff -ur ladvd-0.9.2.orig/src/proto/edp.c ladvd-0.9.2/src/proto/edp.c
+--- ladvd-0.9.2.orig/src/proto/edp.c	2011-02-15 08:59:08.955886660 +0100
++++ ladvd-0.9.2/src/proto/edp.c	2011-02-15 09:01:15.305771498 +0100
+@@ -190,7 +190,7 @@
+     size_t length;
+     struct edp_header edp;
+ 
+-    char *tlv;
++    char __attribute__((__unused__)) *tlv;
+     char *pos;
+     tlv_t type;
+ 
+diff -ur ladvd-0.9.2.orig/src/proto/fdp.c ladvd-0.9.2/src/proto/fdp.c
+--- ladvd-0.9.2.orig/src/proto/fdp.c	2011-02-15 08:59:08.957886706 +0100
++++ ladvd-0.9.2/src/proto/fdp.c	2011-02-15 09:01:30.726123704 +0100
+@@ -216,7 +216,7 @@
+     size_t length;
+     struct fdp_header fdp;
+ 
+-    char *tlv;
++    char __attribute__((__unused__)) *tlv;
+     char *pos;
+     tlv_t type;
+ 
diff --git a/ladvd.spec b/ladvd.spec
index 3fe3ec1..ed59c11 100644
--- a/ladvd.spec
+++ b/ladvd.spec
@@ -9,7 +9,7 @@
 
 Name:           ladvd
 Version:        0.9.2
-Release:        2%{?dist}
+Release:        3%{?dist}
 Summary:        CDP/LLDP sender for unix
 
 Group:          Applications/Internet
@@ -23,6 +23,8 @@ Source4:        %{modulename}.fc
 Source5:        %{modulename}.if
 Source6:        ladvd.tmpfiles
 Source7:        ladvd.service
+# proposed upstream: http://code.google.com/p/ladvd/issues/detail?id=6
+Patch0:         ladvd-0.9.2-add-attribute-unused-to-tlv.patch
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
 BuildRequires:  libevent-devel
@@ -71,6 +73,7 @@ SELinux policy module supporting %{name}
 %setup -q
 mkdir SELinux
 cp -p %{SOURCE3} %{SOURCE4} %{SOURCE5} SELinux
+%patch0 -p1
 
 %build
 %configure \
@@ -187,6 +190,9 @@ fi
 
 
 %changelog
+* Sun Feb 13 2011 Tomasz Torcz <ttorcz at fedoraproject.org> - 0.9.2-3
+- fix FTBFS caused by -Werror=unused-but-set-variable 
+
 * Sun Feb 13 2011 Tomasz Torcz <ttorcz at fedoraproject.org> - 0.9.2-2
 - provide systemd and tmpfiles integration bits
 


More information about the scm-commits mailing list