Pro*C and Pointers are not assignment compatiable

From: Scott T. Johnson <sjohnson_at_ibm.net>
Date: 1997/02/12
Message-ID: <3301B582.75CB_at_ibm.net>#1/1


[Quoted] [Quoted] I am working on a Pro*C program and cannot get rid of the following warning. My Pro*C call is included as well as the code. I am running on an HP using HP-UX 9.04 and the generic C compiler that comes with the OS.

Thanks,
Scott

        /orax2/oracle/7.2/bin/proc sqlcheck=full iname=p.pc

Pro*C/C++: Release 2.1.3.0.0 - Production on Wed Feb 12 07:03:51 1997

Copyright (c) Oracle Corporation 1979, 1994. All rights reserved.

System default option values taken from: /orax2/oracle/7.2/proc/pmscfg.h

        cc -I. -O -Aa -D_HPUX_SOURCE +ESsfc +ESlit -I/orax2/oracle/7.2/sqllib/pc
cc: "p.c", line 209: warning 604: Pointers are not assignment-compatible.
cc: "p.c", line 209: warning 563: Argument #1 is not the correct type. cc: "p.c", line 210: warning 604: Pointers are not assignment-compatible.
cc: "p.c", line 210: warning 563: Argument #1 is not the correct type. cc: "p.c", line 213: warning 604: Pointers are not assignment-compatible.
cc: "p.c", line 213: warning 563: Argument #1 is not the correct type. cc: "p.c", line 214: warning 604: Pointers are not assignment-compatible.
cc: "p.c", line 214: warning 563: Argument #1 is not the correct type. cc: "p.c", line 215: warning 604: Pointers are not assignment-compatible.

Sample Code:

void main(int argc, char **argv)
{

EXEC ORACLE OPTION (ORACA=YES);
 VARCHAR sqlstmt[150];
 VARCHAR v_prodcode[10];
 VARCHAR prodcode[10];

/* The ORACA=YES option must be specified to enable use of
 * the ORACA.
 */

oracle_login("/");

strcpy(sqlstmt.arr, "SELECT PROD_CODE FROM PP_PRODUCT WHERE PROD_CODE"); strcat(sqlstmt.arr, " = :v1"); Received on Wed Feb 12 1997 - 00:00:00 CET

Original text of this message