ecpg compile error on AIX

Поиск
Список
Период
Сортировка
От Tatsuo Ishii
Тема ecpg compile error on AIX
Дата
Msg-id 20020107142743S.t-ishii@sra.co.jp
обсуждение исходный текст
Ответы Re: ecpg compile error on AIX
Re: ecpg compile error on AIX
Список pgsql-hackers
I got followings with current on AIX 5L using xlc (native AIX
compiler):

:
:
:
"data.c", line 357.81: 1506-068 (S) Operation between types "void*" and "long" is not allowed.
"data.c", line 362.90: 1506-068 (S) Operation between types "void*" and "long" is not allowed.

Here is the portion the code:
    *((long long int *) (ind + ind_offset*act_tuple)) = variable->len;

Actually the compiler complains about "ind + ind_offset*act_tuple", 
where :
     void *ind;     long ind_offset;     int act_tuple;

So the code tries to add a long value to a void *pointer, which is not
correct since the storage unit size is unknown for void * I think. If
the code try to do a pointer calculation, "ind" should be casted to an
appropreate type such as char * or long * etc, depending on the logic
of the code.
--
Tatsuo Ishii


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Further info on LWLock behavior
Следующее
От: Marko Kreen
Дата:
Сообщение: Re: pgcryto strangeness...