Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit34ec0c8

Browse files
committed
Fix compiler warnings on 64-bit boxes: difference between
pointers are int64, but warnings are emitted for position info inerror messages in parser, so, just cast it to int32
1 parent6ca4ea8 commit34ec0c8

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
}elseif (*(state->ptr)=='\0' ) {
4949
return false;
5050
}elseif (*(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
}elseif (*(state->ptr)=='\\' ) {
5353
st=GV_WAITESCIN;
5454
}elseif ( !isspace(*(state->ptr)) ) {
@@ -147,15 +147,15 @@ parse_hstore( HSParser *state ) {
147147
}elseif (*(state->ptr)=='\0' ) {
148148
elog(ERROR,"Unexpectd end of string");
149149
}elseif (!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
}elseif (st==WGT ) {
153153
if (*(state->ptr)=='>' ) {
154154
st=WVAL;
155155
}elseif (*(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
}elseif (st==WVAL ) {
161161
if ( !get_val(state, true,&escaped) )
@@ -178,7 +178,7 @@ parse_hstore( HSParser *state ) {
178178
}elseif (*(state->ptr)=='\0' ) {
179179
return;
180180
}elseif (!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)

[8]ページ先頭

©2009-2025 Movatter.jp