[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#300696: marked as done (luxman: FTBFS (amd64/gcc-4.0): cast from 'char*' to 'unsigned int' loses precision)



Your message dated Tue, 26 Apr 2005 14:02:10 -0400
with message-id <E1DQUNu-0001s0-00@newraff.debian.org>
and subject line Bug#300696: fixed in luxman 0.41-21
has caused the attached Bug report to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere.  Please contact me immediately.)

Debian bug tracking system administrator
(administrator, Debian Bugs database)

--------------------------------------
Received: (at submit) by bugs.debian.org; 21 Mar 2005 08:14:18 +0000
>From aj@andaco.de Mon Mar 21 00:14:18 2005
Return-path: <aj@andaco.de>
Received: from c223012.adsl.hansenet.de (localhost.localdomain) [213.39.223.12] 
	by spohr.debian.org with esmtp (Exim 3.35 1 (Debian))
	id 1DDI3F-0005Cg-00; Mon, 21 Mar 2005 00:14:18 -0800
Received: from aj by localhost.localdomain with local (Exim 4.44)
	id 1DDI3E-0005CB-MY; Mon, 21 Mar 2005 09:14:16 +0100
To: Debian Bug Tracking System <submit@bugs.debian.org>
From: Andreas Jochens <aj@andaco.de>
Subject: luxman: FTBFS (amd64/gcc-4.0): cast from 'char*' to 'unsigned int' loses precision
Message-Id: <E1DDI3E-0005CB-MY@localhost.localdomain>
Date: Mon, 21 Mar 2005 09:14:16 +0100
Delivered-To: submit@bugs.debian.org
X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2005_01_02 
	(1.212-2003-09-23-exp) on spohr.debian.org
X-Spam-Status: No, hits=-8.0 required=4.0 tests=BAYES_00,HAS_PACKAGE 
	autolearn=no version=2.60-bugs.debian.org_2005_01_02
X-Spam-Level: 

Package: luxman
Severity: normal
Tags: patch

When building 'luxman' on amd64 with gcc-4.0,
I get the following error:

g++ -Wall -O2 -fomit-frame-pointer -I..    -c -o lf.o lf.cc
lf.cc: In function 'int get_param_name(char*, char*)':
lf.cc:103: error: cast from 'char*' to 'unsigned int' loses precision
lf.cc:103: error: cast from 'char*' to 'unsigned int' loses precision
lf.cc: In function 'char* get_str_param(char*)':
lf.cc:160: error: cast from 'char*' to 'unsigned int' loses precision
lf.cc:160: error: cast from 'char*' to 'unsigned int' loses precision
make[2]: *** [lf.o] Error 1
make[2]: Leaving directory `/luxman-0.41/src'

With the attached patch 'luxman' can be compiled
on amd64 using gcc-4.0.

Regards
Andreas Jochens

diff -urN ../tmp-orig/luxman-0.41/src/lf.cc ./src/lf.cc
--- ../tmp-orig/luxman-0.41/src/lf.cc	1995-03-21 19:09:49.000000000 +0100
+++ ./src/lf.cc	2005-03-21 08:59:22.154305895 +0100
@@ -82,7 +82,7 @@
 static int get_param_name( char *dest, char *buf )
 {
   char *s, *e;
-  int n;
+  long n;
   
   s = buf;
 
@@ -100,7 +100,7 @@
   if ( !*e )
 	return -1;
 
-  n = (unsigned)e - (unsigned)s;
+  n = (unsigned long)e - (unsigned long)s;
 
   strncpy( dest, s, n );
   dest[n] = 0;
@@ -137,7 +137,7 @@
 static char* get_str_param( char *buf )
 {
   char *p, *e, *s;
-  int n;
+  long n;
   
   p = strchr( buf, '=' );
 
@@ -157,7 +157,7 @@
   while( *e && !strchr( " \t\n\r\b", *e ) )
 	++e;
 
-  n = (unsigned)e - (unsigned)p;
+  n = (unsigned long)e - (unsigned long)p;
 
   s = (char*)malloc( n+1 );
   strncpy( s, p, n );

---------------------------------------
Received: (at 300696-close) by bugs.debian.org; 26 Apr 2005 18:11:41 +0000
>From katie@ftp-master.debian.org Tue Apr 26 11:11:41 2005
Return-path: <katie@ftp-master.debian.org>
Received: from newraff.debian.org [208.185.25.31] (mail)
	by spohr.debian.org with esmtp (Exim 3.35 1 (Debian))
	id 1DQUX7-0007Ra-00; Tue, 26 Apr 2005 11:11:41 -0700
Received: from katie by newraff.debian.org with local (Exim 3.35 1 (Debian))
	id 1DQUNu-0001s0-00; Tue, 26 Apr 2005 14:02:10 -0400
From: Matej Vela <vela@debian.org>
To: 300696-close@bugs.debian.org
X-Katie: $Revision: 1.55 $
Subject: Bug#300696: fixed in luxman 0.41-21
Message-Id: <E1DQUNu-0001s0-00@newraff.debian.org>
Sender: Archive Administrator <katie@ftp-master.debian.org>
Date: Tue, 26 Apr 2005 14:02:10 -0400
Delivered-To: 300696-close@bugs.debian.org
X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2005_01_02 
	(1.212-2003-09-23-exp) on spohr.debian.org
X-Spam-Status: No, hits=-6.0 required=4.0 tests=BAYES_00,HAS_BUG_NUMBER 
	autolearn=no version=2.60-bugs.debian.org_2005_01_02
X-Spam-Level: 

Source: luxman
Source-Version: 0.41-21

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

luxman_0.41-21.diff.gz
  to pool/main/l/luxman/luxman_0.41-21.diff.gz
luxman_0.41-21.dsc
  to pool/main/l/luxman/luxman_0.41-21.dsc
luxman_0.41-21_i386.deb
  to pool/main/l/luxman/luxman_0.41-21_i386.deb



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

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

Debian distribution maintenance software
pp.
Matej Vela <vela@debian.org> (supplier of updated luxman 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@debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.7
Date: Tue, 26 Apr 2005 18:56:54 +0200
Source: luxman
Binary: luxman
Architecture: source i386
Version: 0.41-21
Distribution: unstable
Urgency: low
Maintainer: Debian QA Group <packages@qa.debian.org>
Changed-By: Matej Vela <vela@debian.org>
Description: 
 luxman     - Pac-Man clone (svgalib based)
Closes: 300696 302233
Changes: 
 luxman (0.41-21) unstable; urgency=low
 .
   * QA upload.
   * src/lf.cc: Use ptrdiff_t for pointer arithmetic.  Closes: #300696.
   * Rephrase the description.  Closes: #302233.
   * Switch to debhelper.
Files: 
 d15f4948ef77090408f2f2c9c2420ef4 586 games optional luxman_0.41-21.dsc
 c9dd49bdfeb135b4eb0119dc384d8baa 8757 games optional luxman_0.41-21.diff.gz
 ba08ed2fc76e05da60c1f4285aba6cb3 280920 games optional luxman_0.41-21_i386.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)

iD8DBQFCbnznxBYivKllgY8RArelAJ9JvB9zInD6dwxBfjm2Er0AHazl/QCgwlwu
xwvXFohOrLyid3mDVPoz+u0=
=JAMy
-----END PGP SIGNATURE-----



Reply to: