warning: pointer targets in passing argument 3 of ‘accept’ differ in signedness

来源:互联网 发布:学什么编程语言 编辑:程序博客网 时间:2024/05/22 03:28

The first warning tells you you have the wrong type for parameter 3 of accept. It wants a 'socklen_t *', but you are giving it an 'int *'. Declare client_length to be the right type.

[cpp] view plain copy
 print?
  1.     socklen_t  len=sizeof(struct sockaddr);  
  2. 改为:  
  3.     int  len=sizeof(struct sockaddr);   
0 0