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
This commit is contained in:
parent
6ca4ea8a80
commit
34ec0c81af
|
@ -48,7 +48,7 @@ get_val( HSParser *state, bool ignoreeq, bool *escaped ) {
|
||||||
} else if ( *(state->ptr) == '\0' ) {
|
} else if ( *(state->ptr) == '\0' ) {
|
||||||
return false;
|
return false;
|
||||||
} else if ( *(state->ptr) == '=' && !ignoreeq ) {
|
} else if ( *(state->ptr) == '=' && !ignoreeq ) {
|
||||||
elog(ERROR,"Syntax error near '%c' at postion %d", *(state->ptr), state->ptr-state->begin);
|
elog(ERROR,"Syntax error near '%c' at postion %d", *(state->ptr), (int4)(state->ptr-state->begin));
|
||||||
} else if ( *(state->ptr) == '\\' ) {
|
} else if ( *(state->ptr) == '\\' ) {
|
||||||
st = GV_WAITESCIN;
|
st = GV_WAITESCIN;
|
||||||
} else if ( !isspace(*(state->ptr)) ) {
|
} else if ( !isspace(*(state->ptr)) ) {
|
||||||
|
@ -147,7 +147,7 @@ parse_hstore( HSParser *state ) {
|
||||||
} else if ( *(state->ptr) == '\0' ) {
|
} else if ( *(state->ptr) == '\0' ) {
|
||||||
elog(ERROR,"Unexpectd end of string");
|
elog(ERROR,"Unexpectd end of string");
|
||||||
} else if (!isspace(*(state->ptr))) {
|
} else if (!isspace(*(state->ptr))) {
|
||||||
elog(ERROR,"Syntax error near '%c' at postion %d", *(state->ptr), state->ptr-state->begin);
|
elog(ERROR,"Syntax error near '%c' at postion %d", *(state->ptr), (int4)(state->ptr-state->begin));
|
||||||
}
|
}
|
||||||
} else if ( st == WGT ) {
|
} else if ( st == WGT ) {
|
||||||
if ( *(state->ptr) == '>' ) {
|
if ( *(state->ptr) == '>' ) {
|
||||||
|
@ -155,7 +155,7 @@ parse_hstore( HSParser *state ) {
|
||||||
} else if ( *(state->ptr) == '\0' ) {
|
} else if ( *(state->ptr) == '\0' ) {
|
||||||
elog(ERROR,"Unexpectd end of string");
|
elog(ERROR,"Unexpectd end of string");
|
||||||
} else {
|
} else {
|
||||||
elog(ERROR,"Syntax error near '%c' at postion %d", *(state->ptr), state->ptr-state->begin);
|
elog(ERROR,"Syntax error near '%c' at postion %d", *(state->ptr), (int4)(state->ptr-state->begin));
|
||||||
}
|
}
|
||||||
} else if ( st == WVAL ) {
|
} else if ( st == WVAL ) {
|
||||||
if ( !get_val(state, true, &escaped) )
|
if ( !get_val(state, true, &escaped) )
|
||||||
|
@ -178,7 +178,7 @@ parse_hstore( HSParser *state ) {
|
||||||
} else if ( *(state->ptr) == '\0' ) {
|
} else if ( *(state->ptr) == '\0' ) {
|
||||||
return;
|
return;
|
||||||
} else if (!isspace(*(state->ptr))) {
|
} else if (!isspace(*(state->ptr))) {
|
||||||
elog(ERROR,"Syntax error near '%c' at postion %d", *(state->ptr), state->ptr-state->begin);
|
elog(ERROR,"Syntax error near '%c' at postion %d", *(state->ptr), (int4)(state->ptr-state->begin));
|
||||||
}
|
}
|
||||||
} else
|
} else
|
||||||
elog(ERROR,"Unknown state %d at line %d in file '%s'", st, __LINE__, __FILE__);
|
elog(ERROR,"Unknown state %d at line %d in file '%s'", st, __LINE__, __FILE__);
|
||||||
|
|
Loading…
Reference in New Issue