ls_postgres.c: Fix cast alignment change warning

Compiling with clang gave:
ls_postgres.c:251:13: error: cast from 'char *' to 'int *' increases required alignment from 1 to 4 [-Werror,-Wcast-align]

Signed-off-by: Marko Lindqvist <cazfi74@gmail.com>
master^2
Marko Lindqvist 2022-06-13 15:13:59 +03:00
parent 7aba4517f8
commit 0e896d4783
1 changed files with 1 additions and 1 deletions

View File

@ -248,7 +248,7 @@ static void create_coltypes (lua_State *L, cur_data *cur) {
** a reference to it on the cursor structure.
*/
static void _pushtable (lua_State *L, cur_data *cur, size_t off, creator func) {
int *ref = (int *)((char *)cur + off);
int *ref = (int *)cur + off / sizeof(int);
if (*ref != LUA_NOREF)
lua_rawgeti (L, LUA_REGISTRYINDEX, *ref);
else {