New warning in pg_dump - Mailing list pgsql-hackers

From Alvaro Herrera
Subject New warning in pg_dump
Date
Msg-id 20040823155854.GD8990@dcc.uchile.cl
Whole thread Raw
Responses Re: New warning in pg_dump  (Philip Warner <pjw@rhyme.com.au>)
List 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
limitedrange 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
limitedrange 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
limitedrange 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
limitedrange 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)



pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: [PATCHES] ALTER SCHEMA ... SET TABLESPACE
Next
From: Gaetano Mendola
Date:
Subject: Interactive docs