tags 639944 patch
thanks

Уважаемый Дмитрий,

during the Hildesheim bug squashing party I heard about this bug. Please consider my patch. It claims to be an nmu because I did not dive deep enough into debchange
yet.

Actually I changed three lines of code (see lines nine and ten). Your package compiled
succesfully in a pbuilder sid environment younger than two hours.

Kind regards,
   Martin
diff -Nru lowpan-tools-0.2.2/debian/changelog lowpan-tools-0.2.2/debian/changelog
--- lowpan-tools-0.2.2/debian/changelog	2010-09-24 21:22:47.000000000 +0200
+++ lowpan-tools-0.2.2/debian/changelog	2011-12-06 01:21:36.000000000 +0100
@@ -1,3 +1,12 @@
+lowpan-tools (0.2.2-1.1) unstable; urgency=low
+
+  * Non-maintainer upload.
+  * Fix "FTBFS: -Werror=unused-but-set-variable" (Closes: #639944)
+  * check value of s in serial.c after assignment
+  * comment out unused variable in iz-mac.c; function list-response
+
+ -- Martin Eberhard Schauer <[email protected]>  Tue, 06 Dec 2011 01:21:36 +0100
+
 lowpan-tools (0.2.2-1) unstable; urgency=low
 
   * Initial Debian upload.
diff -Nru lowpan-tools-0.2.2/debian/patches/debian-changes-0.2.2-1.1 lowpan-tools-0.2.2/debian/patches/debian-changes-0.2.2-1.1
--- lowpan-tools-0.2.2/debian/patches/debian-changes-0.2.2-1.1	1970-01-01 01:00:00.000000000 +0100
+++ lowpan-tools-0.2.2/debian/patches/debian-changes-0.2.2-1.1	2011-12-06 01:24:17.000000000 +0100
@@ -0,0 +1,80 @@
+Description: Upstream changes introduced in version 0.2.2-1.1
+ This patch has been created by dpkg-source during the package build.
+ Here's the last changelog entry, hopefully it gives details on why
+ those changes were made:
+ .
+ lowpan-tools (0.2.2-1.1) unstable; urgency=low
+ .
+   * Non-maintainer upload.
+   * Fix "FTBFS: -Werror=unused-but-set-variable" (Closes: #639944)
+   * check value of s in serial.c after assignment
+   * comment out unused variable in iz-mac.c; function list-response
+ .
+ The person named in the Author field signed this changelog entry.
+Author: Martin Eberhard Schauer <[email protected]>
+Bug-Debian: http://bugs.debian.org/639944
+
+---
+The information above should follow the Patch Tagging Guidelines, please
+checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here
+are templates for supplementary fields that you might want to add:
+
+Origin: <vendor|upstream|other>, <url of original patch>
+Bug: <url in upstream bugtracker>
+Bug-Debian: http://bugs.debian.org/<bugnumber>
+Bug-Ubuntu: https://launchpad.net/bugs/<bugnumber>
+Forwarded: <no|not-needed|url proving that it has been forwarded>
+Reviewed-By: <name and email of someone who approved the patch>
+Last-Update: <YYYY-MM-DD>
+
+--- lowpan-tools-0.2.2.orig/src/iz-mac.c
++++ lowpan-tools-0.2.2/src/iz-mac.c
+@@ -176,12 +176,16 @@ static iz_res_t list_request(struct iz_c
+ nla_put_failure:
+ 	return IZ_STOP_ERR;
+ }
++/* Debian 639944: pbuilder bailed out in this function:
++   iz-mac.c:184:11: error: variable 'dev_index' set but not used 
++   [-Werror=unused-but-set-variable]
++   first attempt: don't declare and assign dev_index - seems to be local */
+ 
+ static iz_res_t list_response(struct iz_cmd *cmd, struct genlmsghdr *ghdr, struct nlattr **attrs)
+ {
+ 	char * dev_name;
+ 	char * phy_name = NULL;
+-	uint32_t dev_index;
++	/* uint32_t dev_index; */
+ 	unsigned char hw_addr[IEEE802154_ADDR_LEN];
+ 	uint16_t short_addr;
+ 	uint16_t pan_id;
+@@ -197,7 +201,7 @@ static iz_res_t list_response(struct iz_
+ 
+ 	/* Get attribute values from the message */
+ 	dev_name = nla_get_string(attrs[IEEE802154_ATTR_DEV_NAME]);
+-	dev_index = nla_get_u32(attrs[IEEE802154_ATTR_DEV_INDEX]);
++	/* dev_index = nla_get_u32(attrs[IEEE802154_ATTR_DEV_INDEX]); */
+ 	nla_memcpy(hw_addr, attrs[IEEE802154_ATTR_HW_ADDR],
+ 		IEEE802154_ADDR_LEN);
+ 	short_addr = nla_get_u16(attrs[IEEE802154_ATTR_SHORT_ADDR]);
+--- lowpan-tools-0.2.2.orig/src/serial.c
++++ lowpan-tools-0.2.2/src/serial.c
+@@ -129,9 +129,18 @@ int main(int argc, char **argv) {
+ 		perror("ioctl: TIOCSETD");
+ 		return 6;
+ 	}
++/*
++   There is Debian #639944: FTBFS: -Werror=unused-but-set-variable
+ 
++     serial.c: In function 'main':
++     serial.c:45:15: error: variable 's' set but not used
++                     [-Werror=unused-but-set-variable]
++     It seems plausible to test the value of s instead the value of ret
++     from the previous assignment.
++     (see man 2 socket)
++*/
+ 	s = socket(PF_IEEE802154, SOCK_RAW, 0);
+-	if (ret < 0) {
++	if (s < 0) {
+ 		perror("socket");
+ 		return 7;
+ 	}
diff -Nru lowpan-tools-0.2.2/debian/patches/series lowpan-tools-0.2.2/debian/patches/series
--- lowpan-tools-0.2.2/debian/patches/series	2010-09-20 14:07:41.000000000 +0200
+++ lowpan-tools-0.2.2/debian/patches/series	2011-12-06 00:58:08.000000000 +0100
@@ -1 +1,2 @@
 fix-crossbuild.patch
+debian-changes-0.2.2-1.1

Reply via email to