Skip to content

Commit 34ec0c8

Browse files
committed
Fix compiler warnings on 64-bit boxes: difference between
pointers are int64, but warnings are emitted for position info in error messages in parser, so, just cast it to int32
1 parent 6ca4ea8 commit 34ec0c8

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

contrib/hstore/hstore_io.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ get_val( HSParser *state, bool ignoreeq, bool *escaped ) {
4848
} else if ( *(state->ptr) == '\0' ) {
4949
return false;
5050
} else if ( *(state->ptr) == '=' && !ignoreeq ) {
51-
elog(ERROR,"Syntax error near '%c' at postion %d", *(state->ptr), state->ptr-state->begin);
51+
elog(ERROR,"Syntax error near '%c' at postion %d", *(state->ptr), (int4)(state->ptr-state->begin));
5252
} else if ( *(state->ptr) == '\\' ) {
5353
st = GV_WAITESCIN;
5454
} else if ( !isspace(*(state->ptr)) ) {
@@ -147,15 +147,15 @@ parse_hstore( HSParser *state ) {
147147
} else if ( *(state->ptr) == '\0' ) {
148148
elog(ERROR,"Unexpectd end of string");
149149
} else if (!isspace(*(state->ptr))) {
150-
elog(ERROR,"Syntax error near '%c' at postion %d", *(state->ptr), state->ptr-state->begin);
150+
elog(ERROR,"Syntax error near '%c' at postion %d", *(state->ptr), (int4)(state->ptr-state->begin));
151151
}
152152
} else if ( st == WGT ) {
153153
if ( *(state->ptr) == '>' ) {
154154
st = WVAL;
155155
} else if ( *(state->ptr) == '\0' ) {
156156
elog(ERROR,"Unexpectd end of string");
157157
} else {
158-
elog(ERROR,"Syntax error near '%c' at postion %d", *(state->ptr), state->ptr-state->begin);
158+
elog(ERROR,"Syntax error near '%c' at postion %d", *(state->ptr), (int4)(state->ptr-state->begin));
159159
}
160160
} else if ( st == WVAL ) {
161161
if ( !get_val(state, true, &escaped) )
@@ -178,7 +178,7 @@ parse_hstore( HSParser *state ) {
178178
} else if ( *(state->ptr) == '\0' ) {
179179
return;
180180
} else if (!isspace(*(state->ptr))) {
181-
elog(ERROR,"Syntax error near '%c' at postion %d", *(state->ptr), state->ptr-state->begin);
181+
elog(ERROR,"Syntax error near '%c' at postion %d", *(state->ptr), (int4)(state->ptr-state->begin));
182182
}
183183
} else
184184
elog(ERROR,"Unknown state %d at line %d in file '%s'", st, __LINE__, __FILE__);

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