2012-03-30 138 views
1

我使用gSOAP的库警告并wsdl2h和soapcpp2都做工精细的工具生成自动代码时,但在编译多数民众赞成代码时表现出很多警告中的与gSOAP的

warning: unused parameter 'soap' 

原型为:

SOAP_FMAC3 void SOAP_FMAC4 soap_default_std__vectorTemplateOfPointerTodsca__FrameSequence(struct soap *soap, std::vector<dsca__FrameSequence * >*p) 

我不知道如何解决它。

非常感谢你。

回答

1

不用担心警告,gSoap提供了这个参数(gSoap存储它的运行环境)给你。有时你必须使用它,有时你不需要它。如果需要为响应分配内存,则必须使用它。因此gSoap提供了功能soap_malloc(struct soap*, size_t num_bytes)soap_new_YourClassName(struct soap*, int num_instances)