clint-devel Mailing List for Clint
Status: Pre-Alpha
Brought to you by:
dpash
You can subscribe to this list here.
| 2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|---|
|
From: Yan F. <se...@vo...> - 2002-05-03 15:22:56
|
Hello,
i have here a little problem:
when i define p to p:
int **arr;
then allocate memory for 1size array:
if ((arr = (int **) malloc (2 * sizeof(int *))) == NULL) {
printf("no memory");
exit(EXIT_FAILURE);
}
and then memory for every item of this array:
if ((arr[0] = (int *) malloc (3*sizeof(int *))) == NULL) {
printf("no memory");
exit(EXIT_FAILURE);
}
if ((arr[1] = (int *) malloc (3*sizeof(int *))) == NULL) {
printf("no memory");
exit(EXIT_FAILURE);
}
why the hell clint reports
... Passed storage arr not completely defined (*(arr[0]) ...
when im trying to access arr[0]
i read in manual something about it in section 7 but i dont understand why clint behaves this way. ( it _IS_ defined - on line 16 )
compiler is set with -ansi -pedantic -Wall and doesnt reports any error or warning - well - maybe this is my fault because im beginner and still i have no complex clue how it works internally but if u will be so kind and give me an answer or tip how to write code in better way.
thank you
yan
|