ecpg compile error on AIX

From: Tatsuo Ishii <t-ishii(at)sra(dot)co(dot)jp>
To: pgsql-hackers(at)postgresql(dot)org
Subject: ecpg compile error on AIX
Date: 2002-01-07 05:27:43
Message-ID: 20020107142743S.t-ishii@sra.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Marko Kreen 2002-01-07 05:34:50 Re: [HACKERS] pgcryto strangeness...
Previous Message Tom Lane 2002-01-07 04:20:18 Further info on LWLock behavior