Bonjoutr à tous,


Je ne comprends pas.
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#include <stdio.h>
#include <stdlib.h>
 
void B(void* in2);
void A(void* in);
 
 
void A(void* in){
B(  &in );
}
 
void B(void* in2){
printf("%d\n", (int) ((*in2) + 2) );
}
 
int main(void)
{
int c = 2;
 
A(&c); 
 
return EXIT_SUCCESS;
}
---------- GCC ----------
testons5.c:
testons5.c:13: warning: dereferencing `void *' pointer
testons5.c:13: error: void value not ignored as it ought to be