Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
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

pgsql-hackers by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group