Skip to content

Commit b3fcc81

Browse files
committed
Add missing casts to unsigned char in recently-added isspace() calls.
1 parent 7df21fe commit b3fcc81

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

src/backend/utils/adt/float.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $PostgreSQL: pgsql/src/backend/utils/adt/float.c,v 1.101 2004/03/15 03:29:22 tgl Exp $
11+
* $PostgreSQL: pgsql/src/backend/utils/adt/float.c,v 1.102 2004/04/01 22:51:31 tgl Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -276,7 +276,7 @@ float4in(PG_FUNCTION_ARGS)
276276
}
277277

278278
/* skip leading whitespace */
279-
while (*num != '\0' && isspace(*num))
279+
while (*num != '\0' && isspace((unsigned char) *num))
280280
num++;
281281

282282
errno = 0;
@@ -319,7 +319,7 @@ float4in(PG_FUNCTION_ARGS)
319319
}
320320

321321
/* skip trailing whitespace */
322-
while (*endptr != '\0' && isspace(*endptr))
322+
while (*endptr != '\0' && isspace((unsigned char) *endptr))
323323
endptr++;
324324

325325
/* if there is any junk left at the end of the string, bail out */
@@ -441,7 +441,7 @@ float8in(PG_FUNCTION_ARGS)
441441
}
442442

443443
/* skip leading whitespace */
444-
while (*num != '\0' && isspace(*num))
444+
while (*num != '\0' && isspace((unsigned char) *num))
445445
num++;
446446

447447
errno = 0;
@@ -484,7 +484,7 @@ float8in(PG_FUNCTION_ARGS)
484484
}
485485

486486
/* skip trailing whitespace */
487-
while (*endptr != '\0' && isspace(*endptr))
487+
while (*endptr != '\0' && isspace((unsigned char) *endptr))
488488
endptr++;
489489

490490
/* if there is any junk left at the end of the string, bail out */

src/backend/utils/adt/int8.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* Portions Copyright (c) 1994, Regents of the University of California
88
*
99
* IDENTIFICATION
10-
* $PostgreSQL: pgsql/src/backend/utils/adt/int8.c,v 1.52 2004/03/11 02:11:13 neilc Exp $
10+
* $PostgreSQL: pgsql/src/backend/utils/adt/int8.c,v 1.53 2004/04/01 22:51:31 tgl Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -114,7 +114,7 @@ scanint8(const char *str, bool errorOK, int64 *result)
114114
}
115115

116116
/* allow trailing whitespace, but not other trailing chars */
117-
while (*ptr != '\0' && isspace(*ptr))
117+
while (*ptr != '\0' && isspace((unsigned char) *ptr))
118118
ptr++;
119119

120120
if (*ptr != '\0')

src/backend/utils/adt/numutils.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
*
1111
*
1212
* IDENTIFICATION
13-
* $PostgreSQL: pgsql/src/backend/utils/adt/numutils.c,v 1.62 2004/03/11 02:11:13 neilc Exp $
13+
* $PostgreSQL: pgsql/src/backend/utils/adt/numutils.c,v 1.63 2004/04/01 22:51:31 tgl Exp $
1414
*
1515
*-------------------------------------------------------------------------
1616
*/
@@ -88,7 +88,7 @@ pg_atoi(char *s, int size, int c)
8888
* Skip any trailing whitespace; if anything but whitespace
8989
* remains before the terminating character, bail out
9090
*/
91-
while (*badp != c && isspace(*badp))
91+
while (*badp != c && isspace((unsigned char) *badp))
9292
badp++;
9393

9494
if (*badp != c)

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