[PATCH] hxindex: option is int not char

Sebastian Andrzej Siewior bigeasy at linutronix.de
Thu Jun 10 16:37:49 UTC 2010

the return value of getopt is int not char. The difference here is that
char is signed char on x86 but unsigned char on powerpc for instance.
This leads to the following compile error if compiled with -Wextra:

| hxindex.c:777: warning: comparison is always true due to limited range  of data type

because c can never get -1, it can however grow to 255 and the options
will never be parsed properly.

Signed-off-by: Sebastian Andrzej Siewior <bigeasy at linutronix.de>
 hxindex.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/hxindex.c b/hxindex.c
index 47273be..b75c583 100644
--- a/hxindex.c
+++ b/hxindex.c
@@ -758,7 +758,7 @@ int main(int argc, char *argv[])
   Boolean write = True;
   Indexterm termtree = NULL;	/* Sorted tree of terms */
   string secno;
-  char c;
+  int c;
   /* Bind the parser callback routines to our handlers */


Content-Type: message/rfc822
Content-Disposition: inline
Content-Transfer-Encoding: 7bit

Received: (at 585451-close) by bugs.debian.org; 14 Jun 2010 21:59:35 +0000
X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02
	(2008-06-10) on busoni.debian.org
X-Spam-Bayes: score:0.0000 Tokens: new, 41; hammy, 151; neutral, 137; spammy,
	0. spammytokens: hammytokens:0.000-+--HX-Debian:DAK,
	0.000-+--H*RU:, 0.000-+--H*rp:D*ftp-master.debian.org,
	0.000-+--HX-DAK:process-upload, 0.000-+--UD:diff.gz
X-Spam-Status: No, score=-11.0 required=4.0 tests=AWL,BAYES_00,FOURLA,
Return-path: <envelope at ftp-master.debian.org>
Received: from ries.debian.org ([])
	from C=NA,ST=NA,L=Ankh Morpork,O=Debian SMTP,OU=Debian SMTP CA,CN=ries.debian.org,EMAIL=hostmaster at ries.debian.org (verified)
	by busoni.debian.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32)
	(Exim 4.69)
	(envelope-from <envelope at ftp-master.debian.org>)
	id 1OOHgs-0000yz-UV
	for 585451-close at bugs.debian.org; Mon, 14 Jun 2010 21:59:35 +0000
Received: from dak by ries.debian.org with local (Exim 4.69)
	(envelope-from <envelope at ftp-master.debian.org>)
	id 1OOHgq-0000zV-LE; Mon, 14 Jun 2010 21:59:32 +0000
From: Daniel Leidert (dale) <daniel.leidert at wgdd.de>
To: 585451-close at bugs.debian.org
X-DAK: dak process-upload
X-Debian: DAK
X-Debian-Package: html-xml-utils
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit
Subject: Bug#585451: fixed in html-xml-utils 5.7-2
Message-Id: <E1OOHgq-0000zV-LE at ries.debian.org>
Sender: Archive Administrator <dak at ries.debian.org>
Date: Mon, 14 Jun 2010 21:59:32 +0000

Source: html-xml-utils
Source-Version: 5.7-2

We believe that the bug you reported is fixed in the latest version of
html-xml-utils, which is due to be installed in the Debian FTP archive:

  to main/h/html-xml-utils/html-xml-utils_5.7-2.diff.gz
  to main/h/html-xml-utils/html-xml-utils_5.7-2.dsc
  to main/h/html-xml-utils/html-xml-utils_5.7-2_amd64.deb

A summary of the changes between this version and the previous one is

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 585451 at bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
Daniel Leidert (dale) <daniel.leidert at wgdd.de> (supplier of updated html-xml-utils package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster at debian.org)

Hash: SHA1

Format: 1.8
Date: Mon, 14 Jun 2010 23:08:33 +0200
Source: html-xml-utils
Binary: html-xml-utils
Architecture: source amd64
Version: 5.7-2
Distribution: unstable
Urgency: low
Maintainer: Debian XML/SGML Group <debian-xml-sgml-pkgs at lists.alioth.debian.org>
Changed-By: Daniel Leidert (dale) <daniel.leidert at wgdd.de>
 html-xml-utils - HTML and XML manipulation utilities
Closes: 585451
 html-xml-utils (5.7-2) unstable; urgency=low
   * debian/control (Build-Depends): Added quilt.
   * debian/rules: Ditto. Enable parallel builds.
   * debian/README.source: Added because of quilt usage.
   * debian/patches/585451_fix_ftbfs.patch: Added with thanks to Sebastian
     Andrzej Siewior.
     - hxindex.c (main): Fix an FTBFS on arches, where char is an unsigned char
       (closes: #585451).
   * debian/patches/series: Adjusted accordingly.
 b6497b8d64076782c90e81889b3380b2d4670ba4 1362 html-xml-utils_5.7-2.dsc
 642b027b6411ae28e061b1968558ddc2308d530a 4302 html-xml-utils_5.7-2.diff.gz
 153c566fcf7a7bc8b29e8216249f1dc4e02674dc 511288 html-xml-utils_5.7-2_amd64.deb
 25f7f8a9cbb112e1ddb85d89d69578601b4126378ff8c38621aee66731b9d6b5 1362 html-xml-utils_5.7-2.dsc
 fb53c49efbac2248fe0336f665a5f65ed0919af44a5f81c1acbbfabb59495fc8 4302 html-xml-utils_5.7-2.diff.gz
 66e8fc0f23a09b9db958b2f5d52a52d0bddef1bf964e1d620e7727cbb727ba2a 511288 html-xml-utils_5.7-2_amd64.deb
 cff5c254f80fc99890920486d3892c58 1362 text extra html-xml-utils_5.7-2.dsc
 bc9c6a95873e6c9c2fc23d1ce7b5b699 4302 text extra html-xml-utils_5.7-2.diff.gz
 963f5a199782c92741fc5d0a4e16be20 511288 text extra html-xml-utils_5.7-2_amd64.deb

Version: GnuPG v1.4.10 (GNU/Linux)



More information about the debian-xml-sgml-pkgs mailing list