cURL
Haxx ad
libcurl

curl's project page on SourceForge.net

Sponsors:
Haxx

cURL > Mailing List > Monthly Index > Single Mail

curlpp mailing list Archives

[cURLpp] : OptionSetter warning

From: Nicolas Le Goff <nicolas_at_1-click.com>
Date: Thu, 25 Aug 2005 16:11:04 +0200

Hi,

I've updated my current project with the last curlpp available version, and
my Visual C++ 7.1 throwed me a strange warning while compiling.

It came with the "ConnectTimeout" option, but I think it could come from any
other "long" option.

Let me print here the warning :
---------------------------------------------------------------------
e:\SRC-DEV\_V2\include\curlpp\OptionSetter.inl(37) : warning C4312: 'type
cast' : conversion from
'cURLpp::OptionSetter<OptionValueType,optionType>::ParamType' to 'void *' of
greater size
with
[
OptionValueType=long,
optionType=CURLOPT_CONNECTTIMEOUT
]
C:\Visual Studio .NET 2003\Vc7\include\vector(140) : while compiling
class-template member function 'void
cURLpp::OptionSetter<OptionValueType,optionType>::setOpt(cURLpp::CurlHandle
*,cURLpp::OptionSetter<OptionValueType,optionType>::ParamType)'
with
[
OptionValueType=long,
optionType=CURLOPT_CONNECTTIMEOUT
]
e:\SRC-DEV\_V2\include\curlpp\Option.inl(152) : see reference to class
template instantiation 'cURLpp::OptionSetter<OptionValueType,optionType>'
being compiled
with
[
OptionValueType=long,
optionType=CURLOPT_CONNECTTIMEOUT
]
E:\SRC-DEV\_V2\include\boost\date_time\int_adapter.hpp(49) : while compiling
class-template member function 'void
cURLpp::OptionTrait<OptionType,option>::updateHandleToMe(cURLpp::CurlHandle
*) const'
with
[
OptionType=long,
option=CURLOPT_CONNECTTIMEOUT
]
CWebSeed.cpp(348) : see reference to class template instantiation
'cURLpp::OptionTrait<OptionType,option>' being compiled
with
[
OptionType=long,
option=CURLOPT_CONNECTTIMEOUT
]
---------------------------------------------------------------------

As you can see, VC++ likes to repeat the same warning.
Anyway, the important thing is that it came with a change you made in the
"OptionSetter.inl" file :
a (void*) cast !!!

here :
template< typename OptionValueType,
cURL::CURLoption optionType >
void
cURLpp::OptionSetter< OptionValueType,
optionType >::setOpt(cURLpp::CurlHandle *handle,
ParamType value)
{
handle->option(optionType, (void *)value);
}
(and other overloads...)

Setting back with no C-like cast suppresses the warning.
Did a mistake was made ? Is this intended ?

Just to make my mind clear.

Regards,

Nicolas LE GOFF

_______________________________________________
cURLpp mailing list
cURLpp_at_rrette.com
http://www.rrette.com/mailman/listinfo/curlpp
Received on 2005-08-25

These mail archives are generated by hypermail.

donate! Page updated November 12, 2010.
web site info

File upload with ASP.NET