New warning in pg_dump

From: Alvaro Herrera <alvherre(at)dcc(dot)uchile(dot)cl>
To: Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: New warning in pg_dump
Date: 2004-08-23 15:58:55
Message-ID: 20040823155854.GD8990@dcc.uchile.cl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hackers,

I'm seeing this:

gcc -O2 -fno-strict-aliasing -g -Wall -Wmissing-prototypes -Wmissing-declarations -I/home/alvherre/CVS/pgsql/source/00orig/src/interfaces/libpq -I../../../src/include -I/home/alvherre/CVS/pgsql/source/00orig/src/include -D_GNU_SOURCE -DFRONTEND -c -o pg_backup_db.o /home/alvherre/CVS/pgsql/source/00orig/src/bin/pg_dump/pg_backup_db.c -MMD
/home/alvherre/CVS/pgsql/source/00orig/src/bin/pg_dump/pg_backup_db.c: In function `_isIdentChar':
/home/alvherre/CVS/pgsql/source/00orig/src/bin/pg_dump/pg_backup_db.c:874: warning: comparison is always true due to limited range of data type
/home/alvherre/CVS/pgsql/source/00orig/src/bin/pg_dump/pg_backup_db.c: In function `_isDQChar':
/home/alvherre/CVS/pgsql/source/00orig/src/bin/pg_dump/pg_backup_db.c:891: warning: comparison is always true due to limited range of data type

If I change _isIdentChar to be

static int _isIdentChar(unsigned char c)

I get instead

/home/alvherre/CVS/pgsql/source/00orig/src/bin/pg_dump/pg_backup_db.c: In function `_isIdentChar':
/home/alvherre/CVS/pgsql/source/00orig/src/bin/pg_dump/pg_backup_db.c:874: warning: comparison is always true due to limited range of data type
/home/alvherre/CVS/pgsql/source/00orig/src/bin/pg_dump/pg_backup_db.c:874: warning: comparison is always false due to limited range of data type

(yes, both lines), which is kind of strange.

This is

gcc (GCC) 3.4.1 (Mandrakelinux (Alpha 3.4.1-3mdk)

--
Alvaro Herrera (<alvherre[a]dcc.uchile.cl>)
"La fuerza no está en los medios físicos
sino que reside en una voluntad indomable" (Gandhi)

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Mischa Sandberg 2004-08-23 15:58:58 Re: Installing PostgreSQL in a Unix Platform
Previous Message Gaetano Mendola 2004-08-23 15:44:52 Interactive docs