[benh@kernel.crashing.org: Bug#180490: PPC: Please build with -fsigned-char or fix usage of char vs. int with getc()]

Miguel Coca mcoca@gnu.org
Mon Feb 10 22:52:02 2003


--+g7M9IMkV8truYOl
Content-Type: multipart/mixed; boundary="pf9I7BMVVzbSWLtt"
Content-Disposition: inline


--pf9I7BMVVzbSWLtt
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Mon, Feb 10, 2003 at 21:46:32 +0100, Bastian Blank wrote:
> Package: gpa
> Version: 0.6.0-1
> Severity: important
> Tags: sid
>=20
> char is unsigned on PPC
>=20
> char c =3D getc(file);
> while(c !=3D EOF)
> 	blah();
>=20
> The above doesn't work.
>=20
> Ben.

Oops. That must be the cause for the weird behaviour on ARM. Really
stupid mistake, sorry :-)

> ----- End forwarded message -----
>=20
> i found some of this in the cvs, so i think it needs to be fixed there.

I just fixed it. Attached is a patch for 0.6.1, for anyone who is
having problems with this bug.

Thanks.
--=20
Miguel Coca (mcoca@gnu.org)                http://zipi.fi.upm.es/~e970095/
       OpenPGP: E60A CBF4 5C6F 914E B6C1  C402 8C4D C7B6 27FC 3CA8

--pf9I7BMVVzbSWLtt
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="gpa-getc.diff"
Content-Transfer-Encoding: quoted-printable

diff -Nurp gpa-0.6.1.orig/src/options.c gpa-0.6.1/src/options.c
--- gpa-0.6.1.orig/src/options.c	2003-02-10 22:40:58.000000000 +0100
+++ gpa-0.6.1/src/options.c	2003-02-10 22:42:20.000000000 +0100
@@ -342,7 +342,7 @@ static gboolean
 read_next_word (FILE *file, char *buffer, int size)
 {
   int i =3D 0;
-  char c;
+  int c;
=20
   buffer[0] =3D '\0';
   /* Skip leading whitespace */

--pf9I7BMVVzbSWLtt--

--+g7M9IMkV8truYOl
Content-Type: application/pgp-signature
Content-Disposition: inline

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

iD8DBQE+SB9LjE3Htif8PKgRAiKvAKCdjnuyxqMDzqOljtNP6s/KCQYr6QCgr+zX
Dl/5N75/VyAel4hCFajmJCo=
=Z23q
-----END PGP SIGNATURE-----

--+g7M9IMkV8truYOl--