Originally posted by: esv
>
> We upgrade the operating system from AIX5.1 to AIX5.3
> and Oracle9 to Oracle10g.
>
> On compiling ProC files, we got 2 kinds of error/warning messages:-
>
> (1)
> Source Code:=
> char rec_type[4];
> char in_string1000;
> strncpy(rec_type,in_string,3);
> rec_type[3]='\0'; => This is line 2815
>
> Error Message:- "360_Main.pc", line 2815.16: 1506-1298 (W) The subscript 3 is out of range. The valid range is 0 to 2.
>
> But we declare rec_type as rec_type[4].
>
> Anyone can help to solve this problem??
>
I am pretty sure lots of people can help you fix this problem, for free? well you just have to wait. this one looks like a bug to me, Are you using the AIX C compiler? if so and you have purchased support from IBM, call them and complain.
> (2)
>
> Source Code:-
>
> int bytecount;
> size_t maxbytestoread
>
> if (bytecount == maxbytestoread)
>
> This line gives error/warning:-
> "ASXReuterMain.pc", line 430.45: 1506-743 (I) 64-bit portability: possible change of result through conversion of int type into unsigned long int type.
>
> rv = maxbytestoread + 1;
>
> This lines gives error/warning:-
> "ASXReuterMain.pc", line 432.45: 1506-742 (I) 64-bit portability: possible loss of digits through conversion of unsigned long int type into int type.
>
this is clearly a programming error, you are comparing the value of two variables of different types, the complier is warning you that there might be problems during conversion from one to another, maybe you should use 'unsigned long int' or 'size_t' type instead of just plain 'int'.
again, you might call IBM Support, but this time this qualifies as consulting services
> Thanks for assistance
#AIX-Forum