Skip to content

Commit 9225994

Browse files
committed
Fix high-bit comparison compiler warning in pg_dump.
Philip Warner
1 parent 5395aed commit 9225994

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

src/bin/pg_dump/pg_backup_db.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* Implements the basic DB functions used by the archiver.
66
*
77
* IDENTIFICATION
8-
* $PostgreSQL: pgsql/src/bin/pg_dump/pg_backup_db.c,v 1.55 2004/08/20 20:00:34 momjian Exp $
8+
* $PostgreSQL: pgsql/src/bin/pg_dump/pg_backup_db.c,v 1.56 2004/08/28 22:52:50 momjian Exp $
99
*
1010
*-------------------------------------------------------------------------
1111
*/
@@ -37,8 +37,8 @@ static void notice_processor(void *arg, const char *message);
3737
static char *_sendSQLLine(ArchiveHandle *AH, char *qry, char *eos);
3838
static char *_sendCopyLine(ArchiveHandle *AH, char *qry, char *eos);
3939

40-
static int _isIdentChar(char c);
41-
static int _isDQChar(char c, int atStart);
40+
static int _isIdentChar(unsigned char c);
41+
static int _isDQChar(unsigned char c, int atStart);
4242

4343
#define DB_MAX_ERR_STMT 128
4444

@@ -864,14 +864,14 @@ CommitTransactionXref(ArchiveHandle *AH)
864864
destroyPQExpBuffer(qry);
865865
}
866866

867-
static int _isIdentChar(char c)
867+
static int _isIdentChar(unsigned char c)
868868
{
869869
if ( (c >= 'a' && c <= 'z')
870870
|| (c >= 'A' && c <= 'Z')
871871
|| (c >= '0' && c <= '9')
872872
|| (c == '_')
873873
|| (c == '$')
874-
|| (c >= '\200' && c <= '\377')
874+
|| (c >= (unsigned char)'\200') /* no need to check <= \377 */
875875
)
876876
{
877877
return 1;
@@ -882,13 +882,13 @@ static int _isIdentChar(char c)
882882
}
883883
}
884884

885-
static int _isDQChar(char c, int atStart)
886-
{
885+
static int _isDQChar(unsigned char c, int atStart)
886+
{
887887
if ( (c >= 'a' && c <= 'z')
888888
|| (c >= 'A' && c <= 'Z')
889889
|| (c == '_')
890890
|| (atStart == 0 && c >= '0' && c <= '9')
891-
|| (c >= '\200' && c <= '\377')
891+
|| (c >= (unsigned char)'\200') /* no need to check <= \377 */
892892
)
893893
{
894894
return 1;

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy