Skip to content

Commit b35fdaa

Browse files
committed
Clean up some signedness warnings.
1 parent 1a7be5c commit b35fdaa

File tree

3 files changed

+12
-10
lines changed

3 files changed

+12
-10
lines changed

contrib/tsearch2/ispell/regis.c

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,16 @@
99
bool
1010
RS_isRegis(const char *str)
1111
{
12-
unsigned char *ptr = (unsigned char *) str;
13-
14-
while (ptr && *ptr)
15-
if (t_isalpha(ptr) || t_iseq(ptr,'[') || t_iseq(ptr,']') || t_iseq(ptr, '^'))
16-
ptr+=pg_mblen(ptr);
12+
while (str && *str)
13+
{
14+
if (t_isalpha(str) ||
15+
t_iseq(str, '[') ||
16+
t_iseq(str,']') ||
17+
t_iseq(str, '^'))
18+
str += pg_mblen(str);
1719
else
1820
return false;
19-
21+
}
2022
return true;
2123
}
2224

contrib/tsearch2/ts_locale.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ char2wchar(wchar_t *to, const char *from, size_t len)
7474
#endif /* WIN32 */
7575

7676
int
77-
_t_isalpha( char *ptr ) {
77+
_t_isalpha( const char *ptr ) {
7878
wchar_t character;
7979

8080
char2wchar(&character, ptr, 1);
@@ -83,7 +83,7 @@ _t_isalpha( char *ptr ) {
8383
}
8484

8585
int
86-
_t_isprint( char *ptr ) {
86+
_t_isprint( const char *ptr ) {
8787
wchar_t character;
8888

8989
char2wchar(&character, ptr, 1);

contrib/tsearch2/ts_locale.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,9 @@ size_t char2wchar(wchar_t *to, const char *from, size_t len);
4444

4545
#define t_isdigit(x) ( pg_mblen(x)==1 && isdigit( TOUCHAR(x) ) )
4646
#define t_isspace(x) ( pg_mblen(x)==1 && isspace( TOUCHAR(x) ) )
47-
int _t_isalpha( char *ptr );
47+
extern int _t_isalpha( const char *ptr );
4848
#define t_isalpha(x) ( (pg_mblen(x)==1) ? isalpha( TOUCHAR(x) ) : _t_isalpha(x) )
49-
int _t_isprint( char *ptr );
49+
extern int _t_isprint( const char *ptr );
5050
#define t_isprint(x) ( (pg_mblen(x)==1) ? isprint( TOUCHAR(x) ) : _t_isprint(x) )
5151
/*
5252
* t_iseq() should be called only for ASCII symbols

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