[sblim-cmpi-dhcp] Add unused attribute to unused variables
vcrhonek
vcrhonek at fedoraproject.org
Thu May 12 14:00:28 UTC 2011
commit 94504fddaf58e764911636126c1b1251cbb671d8
Author: Vitezslav Crhonek <vcrhonek at redhat.com>
Date: Thu May 12 15:59:31 2011 +0200
Add unused attribute to unused variables
sblim-cmpi-dhcp-1.0-unused-variables.patch | 22 ++++++++++++++++++++++
sblim-cmpi-dhcp.spec | 12 +++++++++---
2 files changed, 31 insertions(+), 3 deletions(-)
---
diff --git a/sblim-cmpi-dhcp-1.0-unused-variables.patch b/sblim-cmpi-dhcp-1.0-unused-variables.patch
new file mode 100644
index 0000000..ec4f7d6
--- /dev/null
+++ b/sblim-cmpi-dhcp-1.0-unused-variables.patch
@@ -0,0 +1,22 @@
+diff -up sblim-cmpi-dhcp-1.0/hashing/libuniquekey.c.orig sblim-cmpi-dhcp-1.0/hashing/libuniquekey.c
+--- sblim-cmpi-dhcp-1.0/hashing/libuniquekey.c.orig 2011-05-12 14:31:47.618875650 +0200
++++ sblim-cmpi-dhcp-1.0/hashing/libuniquekey.c 2011-05-12 15:23:53.199479856 +0200
+@@ -220,7 +220,8 @@ _UQ_linkedList * _UQ_fileToLinkedList(ch
+ /** A method to insert new keys into the the positions mentioned using i and j lines in the .key file*/
+ void _UQ_insertEntity(char * filename, _UQ_linkedList * lptr, int i, int j)
+ {
+- char idFile[50], value[20], *cptr;
++ char idFile[50], value[20];
++ char *cptr __attribute__((__unused__));
+ unsigned long long key;
+ FILE * fd;
+ int count = j - i + 1;
+@@ -441,7 +442,7 @@ unsigned long long _UQ_getKeyFromData(ch
+ {
+ char * linebuf = NULL;
+ size_t len = 0;
+- ssize_t read = 0;
++ ssize_t read __attribute__((__unused__)) = 0;
+ FILE * fd = NULL;
+ unsigned long long val = 0;
+ LOG("getKeyFromData", "Entered");
diff --git a/sblim-cmpi-dhcp.spec b/sblim-cmpi-dhcp.spec
index d8724a2..5bf0299 100644
--- a/sblim-cmpi-dhcp.spec
+++ b/sblim-cmpi-dhcp.spec
@@ -1,10 +1,10 @@
-%define provider_dir %{_libdir}/cmpi
-%define tog_pegasus_version 2:2.6.1-1
+%global provider_dir %{_libdir}/cmpi
+%global tog_pegasus_version 2:2.6.1-1
Name: sblim-cmpi-dhcp
Version: 1.0
-Release: 2%{?dist}
+Release: 3%{?dist}
Summary: SBLIM WBEM-SMT DHCP
Group: Applications/System
@@ -13,6 +13,8 @@ URL: http://sblim.wiki.sourceforge.net/
Source0: http://downloads.sourceforge.net/sblim/%{name}-%{version}.tar.bz2
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+Patch0: sblim-cmpi-dhcp-1.0-unused-variables.patch
+
BuildRequires: tog-pegasus-devel >= %{tog_pegasus_version}
BuildRequires: sblim-tools-libra-devel
BuildRequires: sblim-cmpi-base-devel
@@ -48,6 +50,7 @@ SBLIM WBEM-SMT DHCP Provider Testcase Files for the SBLIM Testsuite
%prep
%setup -q
+%patch0 -p1 -b .unused-variables
%build
@@ -148,6 +151,9 @@ fi
%changelog
+* Thu May 12 2011 Vitezslav Crhonek <vcrhonek at redhat.com> - 1.0-3
+- Add "unused" attribute to unused variables
+
* Wed Feb 09 2011 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
More information about the scm-commits
mailing list